Re: Backspace meaning "go back" in browsers

[prev] [thread] [next] [lurker] [Date index for 2005/02/03]

From: Smylers
Subject: Re: Backspace meaning "go back" in browsers
Date: 23:28 on 03 Feb 2005
Earle Martin writes:

> What fucktard decided that hitting "backspace" should cause your
> browser to go back a page?

Ben Goodger decided it for 'Firefox' on Linux.  It, and the 'Mozilla'
suite, was apparently doing that on Windows for some time (for 'IE'
compatibility, I think).  On Linux BkSpc was a no-op, and Ben decided
Linux users would also benefit from another keystroke for moving back,
so that when they hit the ingrained keystroke for paging up instead of
merely being mildly irritated by nothing happening, you can be properly
annoyed by being on a different page to what you wanted.

Fortunately I've now found how to make BkSpc mean page-up in 'Firefox'
(on Linux anyway; not tested elsewhere).  And, fortunately (from the
point of view of keeping it on-topic on this list), it's hateful:

  1 Install the 'keyconfig' extension.

  2 Restart 'Firefox', because it can't possibly recognize a new
    extension without you losing all your state.

  3 Go to the 'Extensions' window and discover the 'Options' button for
    the 'keyconfig' extension is greyed out, because this extension has
    put its config in a different place from most other extensions.

  4 So go to the 'Tools' menu and choose the new 'Keyconfig' item.  On
    the way past inadvertently make a mental note that its shortcut is
    Ctrl+Shift+F12.
    
    (At some point in the future you can try pressing that key
    combination, only to discover that the 'undoclosetab' extension also
    uses it, so it doesn't bring up the 'Keyconfig' window anyway,
    despite the label on the menu.  Because it would be too hard to
    ensure that the code that determines the shortcut keys shown on
    menus used the same algorithm as that which determines what happens
    when you press a shortcut key.)

  5 Click on the second row labelled 'Back' (yup, cos actions that have
    alternative keystrokes need multiple rows in the table -- but only
    those actions to which the browser developers have assigned multiple
    keystrokes by default have multiple rows; you can't add alternatives
    to any action), while trying to avoid thinking about why there's a
    row labelled 'Browser:Back' (assigned to Ctrl+[) and how that action
    might differ from just 'Back'.

  6 Note that "Backspace" has appeared in a textbox under the list.
    Focus that textbox, and the text becomes highlighted.  Attempt to
    remove the text by pressing BkSpc, but discover nothing happens.
    Try pressing Del and see the text "Del" appear in the box.  Give up
    on that and press the 'Disable' button instead.

  7 Scroll down the rest of the list and discover there is no 'Page Up'
    action to which a new keystroke can be assigned.  Still having BkSpc
    not going back is halfway there.  Press 'OK'.

  8 "Alert: Changes affect only new windows."  Grrr.

  9 Quit and restart the browser again to check that this works.

 10 Find the main 'Firefox' directory, and as root edit the file
    res/builtin/platformHTMLBindings.xml.  Note that this will affect
    all users; the per-user version of this file doesn't actually work.
    Also note that you're going to have to redo this every time you
    upgrade 'Firefox'.  Search for "cmd_scrollPageUp", and discover that
    it's assigned to Shift+Space.

 11 (This step is now optional, but it wasn't the first time I tried
    this.)  Search for documentation as to what the rune is for the
    BkSpc key.  Find several places which apparently document it, for
    example as VK_BACK_SPACE, but where quitting and restarting the
    browser shows this not to work.  Eventually discover it's VK_BACK.

 12 Add this line to the platformHTMLBindings.xml file, just below the
    Shift+Space line:

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

 13 Quit and restart the browser one last time.  You can now use Space
    to page down and BkSpc to page up!

I think I'd actually prefer for this not to be possible than for it to
be achievable but only in such a convoluted way.  And don't think about
missing out steps 1-7 above: merely adding the line to
platformHTMLBindings.xml is not sufficient for the end result.

Smylers

Generated at 02:00 on 04 Feb 2005 by mariachi 0.52