Change WebKit's accesskey modifier to prevent conflicts
Mar 21, '07 07:30:03AM • Contributed by: Echidna
Mar 21, '07 07:30:03AM • Contributed by: Echidna
Many sites are implementing more and more accesskeys. While this is sometimes handy, more often than not it ends up conflicting with the regular system behavior. For example, in text areas I often use the emacs-style commands to move the cursor; these are overridden if the site uses accesskeys.
I thought that it would be absolutely magnificent if the modifier key for accesskeys would be Control-Option. That would prevent the vast majority of conflicts (most notably those emacs bindings!). Well, thanks to the open source WebKit, this is possible. (You'll need the Developer Tools installed to complete this hint.)
First, follow the easy instructions at WebKit.org to "check out" a copy of the latest developer source. Once it's all downloaded, open up WebKit » WebCore » dom » Document.cpp and go to line 2347 (or so). Look around for the void Document::defaultEventHandler(Event *evt) function. Replace the line if (kevt->ctrlKey()) { with if (kevt->ctrlKey() && kevt->altKey()) {.
Then follow the instructions at WebKit.org to build and run Safari with your modified framework.
I thought that it would be absolutely magnificent if the modifier key for accesskeys would be Control-Option. That would prevent the vast majority of conflicts (most notably those emacs bindings!). Well, thanks to the open source WebKit, this is possible. (You'll need the Developer Tools installed to complete this hint.)
First, follow the easy instructions at WebKit.org to "check out" a copy of the latest developer source. Once it's all downloaded, open up WebKit » WebCore » dom » Document.cpp and go to line 2347 (or so). Look around for the void Document::defaultEventHandler(Event *evt) function. Replace the line if (kevt->ctrlKey()) { with if (kevt->ctrlKey() && kevt->altKey()) {.
Then follow the instructions at WebKit.org to build and run Safari with your modified framework.
•
[5,596 views]
