[haiku-bugs] Re: [Haiku] #7970: Keyboard Intents

  • From: "jscipione" <trac@xxxxxxxxxxxx>
  • Date: Thu, 08 Sep 2011 17:39:29 -0000

#7970: Keyboard Intents
----------------------------------+----------------------------
   Reporter:  sffjunkie           |      Owner:  axeld
       Type:  enhancement         |     Status:  new
   Priority:  normal              |  Milestone:  R1
  Component:  Preferences/Keymap  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------

Comment (by jscipione):

 I have thought about this feature a bit already and I think the best
 approach is to extend the BTextView class to just have more keyboard
 options and not have a preference pane. Any class that derives from
 BTextView would also inherit the keyboard options from it. Here are the
 keyboard options that I propose:


 Beginning of line is home key and Alt+left, end of line is end key and
 Alt+right. Beginning of document is Alt+up, end of document is Alt+down.
 Back a word is Ctrl+left, forward a word is Ctrl+right. Up a paragraph is
 Ctrl+up, down a paragraph is Ctrl+down. Add shift the each of the above
 shortcuts to highlight. Page up and Page down would go up a page and down
 a page respectively of course.


 A mnemonic to remember the above is that the Alt key makes global step,
 working on the level of lines and documents, whereas the Ctrl key makes
 local step working on the level of words and paragraphs. This jives with
 the Haiku philosophy because Alt is the dominant key and Ctrl is the
 subordinate one, opposite of Windows. Remember that we have already made a
 provision for Windows people have to option to switch Alt and Ctrl in the
 keymap preference pane.


 Also emacs keybindings would be another nice addition. Ctrl+A for
 beginning of line, Ctrl+E for end of line, Alt+F to go forward a word,
 Alt+B to go back a word, Ctrl+K to delete to the end of the current line.
 There are probably a few other common ones people can suggest as well. I
 guess Alt+B already means bold most of the time so Alt+B should go back a
 word only if no text is highlighted, otherwise it is reserved for
 applications to implement bold. Yes emacs key bindings are a bit on the
 nerdy Linux/sysadmin/programmer side of things but we are talking about
 keyboard shortcuts for text editing here, the kind of thing that nerds
 need to do an awful lot.


 I am not sure how much benefit there would be to making this all
 configurable, adding a preference pane for it, and putting it all in the
 input server. But, if you really think that it would be worthwhile and you
 can convince me of why, I would be willing to put some work in to make
 this happen. I think that extending the BTextView class with more options
 is enough. For those who want the Home and End key to respectively go to
 the beginning and end of the document (Mac style) instead of to the
 beginning and end of a line (Windows style), well, screw those people.
 They'll just have to use Alt+up and Alt+down.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/7970#comment:1>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: