I have an input field that always has focus. Commands that enter this input field are always letters. If the user clicks the number, I would like it to not be added to the text box, but instead use it to run another command (like a hotkey).
The way I saw this is to look at the keyup event and remove the unnecessary characters. Instead, is there a way to intercept keyboard input and verify that this value is before pasting?
I thought about creating a custom input field using a div and intercepting all keyboard commands. Is there any way to get the flashing carriages so that it looks like an input field?
source share