troubleshooting Question

event.KeyCode combined with <ctrl>-Key

Avatar of flo_s
flo_s asked on
JavaScript
4 Comments1 Solution1335 ViewsLast Modified:
Hi there!
I want to get the interger from
event.keyCode
into a char.
I know that I can use
"String.fromCharCode(event.keyCode)"
But now the problem:
I use the <ctrl>-Key to implement
shortcuts in an html-form (f.i. <ctrl>+<s> for submit,
or <ctrl>+b for back (with "if(event.ctrlKey)")
So when I just press <y> for instance I get the
according char with "String.fromCharCode(event.keyCode)"
without problems.
But when I use <ctrl>+<y> I get another int from "event.keyCode"  which cannot be transformed to the
char <y> with "String.fromCharCode(event.keyCode)"

Does anyone know how to get the pressed char from event.keyCode when I not just pressed a single char,
than <ctrl>+<char> ?
Thanks 4 your help!
Florian
ASKER CERTIFIED SOLUTION
bobbit31

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros