The Artima Developer Community
Sponsored Link

Java Buzz Forum
keyCode pains with Firefox on the Mac

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
keyCode pains with Firefox on the Mac Posted: Jan 10, 2007 9:35 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: keyCode pains with Firefox on the Mac
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

I have been playing a lot with GreaseMonkey recently, and ran into a bug that was confusing.

I had added a key combo of Control-Return/Enter to do some work. Nothing was happening when I did that combo so I looked to see what was going wrong.

I put in:

window.addEventListener('keydown', function(e) {
        alert(e.keyCode);
}, false);

and started keying around.

Hitting enter/return came up with 13. Good.

Control by itself returned 17. Good.

Control (left or right) and the main Return came back with 77 (which is M)

Control (left or right) and the Enter came back with 67 (which is C)

This is all on FF 2.0.1. Safari came back with flying colors (not much help for GreaseMonkey of course).

This means that if I hack it and capture all of the key combos, if someone really does do a Control-M or a Control-C it would ALSO fire off this event.

Has anyone else run into this? To me, it means that I have to choose another modifier key. Time for Shift-Return I guess.

Read: keyCode pains with Firefox on the Mac

Topic: links for 2007-01-06 from PeopleOverProcess.com Previous Topic   Next Topic Topic: Web 2.0 Enabled $100 Laptop Will Reach Children in February

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use