Hi all,

  As I outlined in a recent message, we've had a long-standing problem of
page-modes binding alternative keys for navigation commands that are
shadowed by the page-mode's fallthrough keys.  These alternatives have
been bound with the prefix C-c, so in addition to breaking modularity
(binding commands that are not part of the page-mode), they were breaking
the convention that sequences of C-c followed by an unmodified alphabetic
character are reserved for the user.  A blemish for sure!  A solution is
now in place, and those C-c bindings in page-mode keymaps have been
removed.

  You can now access bindings in the standard keymaps which are shadowed
by a page-mode keymap by using the prefix key C-z.

  The solution to the problem was simpler than I had imagined, and really
follows naturally from the existing design of our keymap system.  (Only
minor modifications to the help system were needed to make it work.  The
keymap and input systems required no changes.)  In short, C-z is defined
as a recursive key binding.  It is bound in both default_global_keymap and
content_buffer_normal_keymap as a link back to those very keymaps,
allowing you to access shadowed keys through a two-key sequence instead of
directly.

  Incidentally this also allows you to access such keys when they are
shadowed by contextual keymaps like textarea-keymap, etc.  Whether or not
we want to keep it that way is open for discussion, but it seems a nice
enough side-effect to me.

  This worked out to be a very clean solution in my book, because it works
in terms of the already existing keymap system, no new scaffolding
required.  I did try to stay true to the simplicity provided by the old
C-c bindings, hence C-z for the new key.  It was really the only available
combo that fit all criteria.

-- 
John Foerch
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to