Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change WebKit's accesskey modifier to prevent conflicts Web Browsers
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.

    •    
  • Currently 4.00 / 5
  You rated: 5 / 5 (4 votes cast)
 
[5,599 views]  

Change WebKit's accesskey modifier to prevent conflicts | 1 comments | Create New Account
Click here to return to the 'Change WebKit's accesskey modifier to prevent conflicts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
for mozilla browsers...
Authored by: ra5ul on Apr 23, '07 05:46:48PM
i'm not sure when this was fixed, but [Alt] is now an available OSX accesskey modifier in firefox/camino. so if you want [Ctrl] - [Alt] behavior (like the OP):

user_pref("ui.key.contentAccess", 6);

see http://kb.mozillazine.org/Ui.key.contentAccess for more info.

[ Reply to This | # ]