So I was looking around on http://www.mozilla.org/unix/customizing.html
and I've got to say there's some really neat stuff on there.

I created /usr/lib/mozilla/res/builtin/userHTMLBindings.xml and gave it
the following contents:

<?xml version="1.0"?>

<bindings id="htmlBindings"
   xmlns="http://www.mozilla.org/xbl";
   xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";>

  <binding id="browserUser">
    <handlers>
      <handler event="keypress" key="h" command="cmd_scrollLeft"/>
      <handler event="keypress" key="j" command="cmd_scrollLineDown"/>
      <handler event="keypress" key="k" command="cmd_scrollLineUp"/>
      <handler event="keypress" key="l" command="cmd_scrollRight"/>
    </handlers>
  </binding>
    
</bindings>

...to get vi-like keybindings for moving the window around, like in
Konqueror (except I don't think that Konqueror implements h and l).

Now, from looking around at other keybindings files and at
<http://lxr.mozilla.org/seamonkey/source/dom/public/idl/events/nsIDOMKeyEvent.idl>,
I figured that I should be able to add a line like the following:

      <handler event="keypress" keycode="VK_BACK_SPACE" command="cmd_scrollPageUp" />

...to the handlers section above and be able to scroll up with my
backspace key.  However, when I attempt this, it clobbers the page down
function of my spacebar, although I can still use PageUp and PageDown.
I've tried various things such as adding DOM_ to the front of
VK_BACK_SPACE, omitting the VK_, removing the _ between BACK and SPACE,
and various combinations of these things, to no avail.  I'd really like
to be able to page up and page down without having to move my hand away
from the home row.  In the mean time I'm using Ctrl-j and Ctrl-k as page
up and page down keys.

Mozilla version is 0.9.4; I'm using the Debian package, version 0.9.4-3.
The full version information from about: is "Mozilla 0.9.4 Mozilla/5.0
(X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010920".

What am I doing wrong?  Any ideas?  Any help is appreciated.  If it's
not too much trouble, please Cc: me on the reply.

Thanks.

-- 
Bill Jonas    *    [EMAIL PROTECTED]    *    http://www.billjonas.com/
"They that can give up  essential  liberty to obtain a little temporary
safety deserve neither liberty nor safety."        -- Benjamin Franklin

Reply via email to