Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if key is keydown is charcter

export function producesCharacter(event: React.KeyboardEvent<HTMLInputElement>) {
   return !event.ctrlKey && !event.altKey && event.key.length === 1;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #key #keydown #charcter
ADD COMMENT
Topic
Name
6+2 =