Bug 1077515 - part 10 - Update xbl keypress handlers to use physical-direction movement/selection commands. r=roc
authorJonathan Kew <jkew@mozilla.com>
Sat, 22 Nov 2014 14:39:04 +0000
changeset 217000 23fcc95993718d7c99042c80683c844b735dee48
parent 216999 228cc7984e2f89cd09cc62aec86c477a61e69364
child 217001 4c90e4b108ec5abd714867d511e0791ddb0254bd
push id52195
push userjkew@mozilla.com
push dateSat, 22 Nov 2014 14:54:52 +0000
treeherdermozilla-inbound@203d3b5da245 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1077515
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1077515 - part 10 - Update xbl keypress handlers to use physical-direction movement/selection commands. r=roc
dom/xbl/builtin/browser-base.inc
dom/xbl/builtin/editor-base.inc
dom/xbl/builtin/input-fields-base.inc
dom/xbl/builtin/mac/platformHTMLBindings.xml
dom/xbl/builtin/textareas-base.inc
dom/xbl/builtin/unix/platformHTMLBindings.xml
dom/xbl/builtin/win/platformHTMLBindings.xml
--- a/dom/xbl/builtin/browser-base.inc
+++ b/dom/xbl/builtin/browser-base.inc
@@ -1,14 +1,14 @@
       <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" />
       <handler event="keypress" key=" " command="cmd_scrollPageDown" />
 
-      <handler event="keypress" keycode="VK_UP" command="cmd_linePrevious" />
-      <handler event="keypress" keycode="VK_DOWN" command="cmd_lineNext" />
-      <handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext" />
+      <handler event="keypress" keycode="VK_UP" command="cmd_moveUp" />
+      <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown" />
+      <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft" />
+      <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight" />
 
       <handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/>
       <handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/>
       <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/>
       <handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/>
       <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
       <handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/>
--- a/dom/xbl/builtin/editor-base.inc
+++ b/dom/xbl/builtin/editor-base.inc
@@ -1,17 +1,19 @@
       <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" />
       <handler event="keypress" key=" " command="cmd_scrollPageDown" />
 
-      <handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
-      <handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
-      <handler event="keypress" keycode="VK_LEFT" command="cmd_selectCharPrevious" modifiers="shift"/>
-      <handler event="keypress" keycode="VK_RIGHT" command="cmd_selectCharNext" modifiers="shift"/>
-      <handler event="keypress" keycode="VK_UP" command="cmd_linePrevious"/>
-      <handler event="keypress" keycode="VK_DOWN" command="cmd_lineNext"/>
-      <handler event="keypress" keycode="VK_UP" command="cmd_selectLinePrevious" modifiers="shift"/>
-      <handler event="keypress" keycode="VK_DOWN" command="cmd_selectLineNext" modifiers="shift"/>
+      <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft"/>
+      <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight"/>
+      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight"/>
+
+      <handler event="keypress" keycode="VK_UP" command="cmd_moveUp"/>
+      <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown"/>
+      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown"/>
+
       <handler event="keypress" key="z" command="cmd_undo" modifiers="accel"/>
       <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
       <handler event="keypress" key="x" command="cmd_cut" modifiers="accel"/>
       <handler event="keypress" key="c" command="cmd_copy" modifiers="accel"/>
       <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/>
       <handler event="keypress" key="v" command="cmd_pasteNoFormatting" modifiers="accel,shift"/>
--- a/dom/xbl/builtin/input-fields-base.inc
+++ b/dom/xbl/builtin/input-fields-base.inc
@@ -1,14 +1,17 @@
-    <handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
-    <handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
-    <handler event="keypress" keycode="VK_LEFT" modifiers="shift"
-        command="cmd_selectCharPrevious"/>
-    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift"
-        command="cmd_selectCharNext"/>
+    <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft"/>
+    <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight"/>
+    <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft"/>
+    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight"/>
+
+    <handler event="keypress" keycode="VK_UP" command="cmd_moveUp"/>
+    <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown"/>
+    <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp"/>
+    <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown"/>
 
     <!-- Cut/copy/paste/undo -->
     <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/>
     <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/>
     <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/>
-    <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
     <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/>
+    <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo" />
 
--- a/dom/xbl/builtin/mac/platformHTMLBindings.xml
+++ b/dom/xbl/builtin/mac/platformHTMLBindings.xml
@@ -33,26 +33,32 @@
   <binding id="browser">
     <handlers>
 #include ../browser-base.inc
       <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_scrollPageUp"/>
       <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_scrollPageDown"/>
       <handler event="keypress" keycode="VK_HOME" command="cmd_scrollTop" /> 
       <handler event="keypress" keycode="VK_END"  command="cmd_scrollBottom" /> 
 
-      <handler event="keypress" keycode="VK_LEFT" modifiers="alt" command="cmd_wordPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_wordNext" />
-      <handler event="keypress" keycode="VK_LEFT" modifiers="alt,shift" command="cmd_selectWordPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="alt,shift" command="cmd_selectWordNext" />
-      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectCharPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectCharNext" />
-      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectLinePrevious" />
-      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" />
-      <handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_moveTop"/>
-      <handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_moveBottom"/>
+      <handler event="keypress" keycode="VK_LEFT" modifiers="alt" command="cmd_moveLeft2" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="alt" command="cmd_moveRight2" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="alt,shift" command="cmd_selectLeft2" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="alt,shift" command="cmd_selectRight2" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="accel" command="cmd_moveLeft3"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="accel" command="cmd_moveRight3"/>
+      <handler event="keypress" keycode="VK_UP" modifiers="alt" command="cmd_moveUp2" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="alt" command="cmd_moveDown2" />
+      <handler event="keypress" keycode="VK_UP" modifiers="alt,shift" command="cmd_selectUp2" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="alt,shift" command="cmd_selectDown2" />
+      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown" />
+      <handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_moveUp3"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_moveDown3"/>
     </handlers>
   </binding>
 
   <binding id="editor">
     <handlers>
       <handler event="keypress" key=" " modifiers="shift" command="cmd_scrollPageUp" />
       <handler event="keypress" key=" " command="cmd_scrollPageDown" />
 
--- a/dom/xbl/builtin/textareas-base.inc
+++ b/dom/xbl/builtin/textareas-base.inc
@@ -1,19 +1,16 @@
-    <handler event="keypress" keycode="VK_LEFT" command="cmd_charPrevious"/>
-    <handler event="keypress" keycode="VK_RIGHT" command="cmd_charNext"/>
-    <handler event="keypress" keycode="VK_LEFT" modifiers="shift"
-        command="cmd_selectCharPrevious"/>
-    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift"
-        command="cmd_selectCharNext"/>
-    <handler event="keypress" keycode="VK_UP" command="cmd_linePrevious"/>
-    <handler event="keypress" keycode="VK_DOWN" command="cmd_lineNext"/>
-    <handler event="keypress" keycode="VK_UP" modifiers="shift"
-        command="cmd_selectLinePrevious"/>
-    <handler event="keypress" keycode="VK_DOWN" modifiers="shift"
-        command="cmd_selectLineNext"/>
+    <handler event="keypress" keycode="VK_LEFT" command="cmd_moveLeft"/>
+    <handler event="keypress" keycode="VK_RIGHT" command="cmd_moveRight"/>
+    <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft"/>
+    <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight"/>
+
+    <handler event="keypress" keycode="VK_UP" command="cmd_moveUp"/>
+    <handler event="keypress" keycode="VK_DOWN" command="cmd_moveDown"/>
+    <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp"/>
+    <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown"/>
 
     <!-- Cut/copy/paste/undo -->
     <handler event="keypress" key="c" modifiers="accel" command="cmd_copy"/>
     <handler event="keypress" key="x" modifiers="accel" command="cmd_cut"/>
     <handler event="keypress" key="v" modifiers="accel" command="cmd_paste"/>
     <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/>
-    <handler event="keypress" key="z" command="cmd_redo" modifiers="accel,shift" />
+    <handler event="keypress" key="z" modifiers="accel,shift" command="cmd_redo" />
--- a/dom/xbl/builtin/unix/platformHTMLBindings.xml
+++ b/dom/xbl/builtin/unix/platformHTMLBindings.xml
@@ -40,31 +40,37 @@
       <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/>
       <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/>
 
       <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut" /> 
       <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_copy" /> 
       <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy" /> 
       <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/>
       <handler event="keypress" keycode="VK_END" command="cmd_endLine"/>
+      <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" />
+      <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" />
       <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/>
       <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/>
       <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" /> 
       <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" /> 
 
-      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext" />
-      <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectWordPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectWordNext" />
-      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectCharPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectCharNext" />
-      <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" />
-      <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" />
-      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectLinePrevious" />
-      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectLeft2" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectRight2" />
+
+      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown" />
+      <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2" />
+      <handler event="keypress" keycode="VK_UP" modifiers="control,shift" command="cmd_selectUp2" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="control,shift" command="cmd_selectDown2" />
+
       <handler event="keypress" key="a" modifiers="alt" command="cmd_selectAll"/>
     </handlers>
   </binding>
 
   <binding id="editor">
     <handlers>
 #include ../editor-base.inc
       <handler event="keypress" key="z" modifiers="accel" command="cmd_undo"/>
--- a/dom/xbl/builtin/win/platformHTMLBindings.xml
+++ b/dom/xbl/builtin/win/platformHTMLBindings.xml
@@ -6,94 +6,87 @@
 
 <bindings id="htmlBindings"
    xmlns="http://www.mozilla.org/xbl"
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  
   <binding id="inputFields" bindToUntrustedContent="true">
     <handlers>
 #include ../input-fields-base.inc
-      <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/>
       <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/>
       <handler event="keypress" keycode="VK_END" command="cmd_endLine"/>
       <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine"/>
       <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine"/>
-      <handler event="keypress" keycode="VK_HOME" modifiers="shift,control"
-        command="cmd_selectTop"/>
-      <handler event="keypress" keycode="VK_END" modifiers="shift,control"
-        command="cmd_selectBottom"/>
-      <handler event="keypress" keycode="VK_HOME" modifiers="control"
-        command="cmd_moveTop"/>
-      <handler event="keypress" keycode="VK_END" modifiers="control"
-        command="cmd_moveBottom"/>
-      <handler event="keypress" keycode="VK_LEFT" modifiers="control"
-        command="cmd_wordPrevious"/>
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="control"
-        command="cmd_wordNext"/>
-      <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control"
-        command="cmd_selectWordPrevious"/>
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control"
-        command="cmd_selectWordNext"/>
-      <handler event="keypress" key="y" modifiers="accel"
-        command="cmd_redo"/>
+      <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/>
+      <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/>
+      <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/>
+      <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/>
+
+      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2"/>
+      <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectLeft2"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectRight2"/>
 
-      <handler event="keypress" keycode="VK_DELETE" modifiers="shift"
-        command="cmd_cutOrDelete"/>
-      <handler event="keypress" keycode="VK_DELETE" modifiers="control"
-        command="cmd_deleteWordForward"/>
-      <handler event="keypress" keycode="VK_INSERT" modifiers="control"
-        command="cmd_copy"/>
-      <handler event="keypress" keycode="VK_INSERT" modifiers="shift"
-        command="cmd_paste"/>
-      <handler event="keypress" keycode="VK_BACK" modifiers="alt"
-        command="cmd_undo"/>
-      <handler event="keypress" keycode="VK_BACK" modifiers="alt,shift"
-        command="cmd_redo"/>
-      <handler event="keypress" keycode="VK_BACK" modifiers="control"
-        command="cmd_deleteWordBackward"/>
+      <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2"/>
+      <handler event="keypress" keycode="VK_UP" modifiers="shift,control" command="cmd_selectUp2"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="shift,control" command="cmd_selectDown2"/>
+
+      <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/>
+      <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_deleteWordForward"/>
+      <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/>
+      <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/>
+
+      <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_undo"/>
+      <handler event="keypress" keycode="VK_BACK" modifiers="alt,shift" command="cmd_redo"/>
+      <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/>
+
+      <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/>
+      <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/>
     </handlers>
   </binding>
 
   <binding id="textAreas" bindToUntrustedContent="true">
     <handlers>
 #include ../textareas-base.inc
-      <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/>
-      <handler event="keypress" keycode="VK_HOME" 
-        command="cmd_beginLine"/>
-      <handler event="keypress" keycode="VK_END" 
-        command="cmd_endLine"/>
-      <handler event="keypress" keycode="VK_HOME" modifiers="shift" 
-        command="cmd_selectBeginLine"/>
-      <handler event="keypress" keycode="VK_END" modifiers="shift"
-        command="cmd_selectEndLine"/>
-      <handler event="keypress" keycode="VK_HOME" modifiers="shift,control"
-        command="cmd_selectTop"/>
-      <handler event="keypress" keycode="VK_END" modifiers="shift,control"
-        command="cmd_selectBottom"/>
-      <handler event="keypress" keycode="VK_HOME" modifiers="control"
-        command="cmd_moveTop"/>
+      <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/>
+      <handler event="keypress" keycode="VK_END" command="cmd_endLine"/>
+      <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine"/>
+      <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine"/>
+      <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/>
+      <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/>
+      <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/>
       <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/>
-      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious"/>
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext"/>
-      <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectWordPrevious"/>
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectWordNext"/>
+
+      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2"/>
+      <handler event="keypress" keycode="VK_LEFT" modifiers="shift,control" command="cmd_selectLeft2"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,control" command="cmd_selectRight2"/>
+
+      <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2"/>
+      <handler event="keypress" keycode="VK_UP" modifiers="shift,control" command="cmd_selectUp2"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="shift,control" command="cmd_selectDown2"/>
+
       <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
       <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/>
       <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/>
       <handler event="keypress" keycode="VK_PAGE_DOWN" modifiers="shift" command="cmd_selectPageDown"/>
-      <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/>
 
       <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/>
       <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_deleteWordForward"/>
       <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/>
       <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/>
+
       <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_undo"/>
       <handler event="keypress" keycode="VK_BACK" modifiers="alt,shift" command="cmd_redo"/>
-      <handler event="keypress" keycode="VK_BACK" modifiers="control"
-        command="cmd_deleteWordBackward"/>
+      <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/>
+
+      <handler event="keypress" key="a" modifiers="accel" command="cmd_selectAll"/>
+      <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/>
      </handlers>
   </binding>
 
   <binding id="browser">
     <handlers>
 #include ../browser-base.inc
       <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
       <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/>
@@ -105,50 +98,62 @@
       <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/>
       <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/>
       <handler event="keypress" keycode="VK_END" command="cmd_endLine"/>
       <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/>
       <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/>
       <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop" />
       <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom" />
 
-      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_wordPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_wordNext" />
-      <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectWordPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectWordNext" />
-      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectCharPrevious" />
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectCharNext" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="control" command="cmd_moveLeft2" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="control" command="cmd_moveRight2" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="control,shift" command="cmd_selectLeft2" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="control,shift" command="cmd_selectRight2" />
+      <handler event="keypress" keycode="VK_LEFT" modifiers="shift" command="cmd_selectLeft" />
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift" command="cmd_selectRight" />
+
+      <handler event="keypress" keycode="VK_UP" modifiers="control" command="cmd_moveUp2" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="control" command="cmd_moveDown2" />
+      <handler event="keypress" keycode="VK_UP" modifiers="control,shift" command="cmd_selectUp2" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="control,shift" command="cmd_selectDown2" />
+      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectUp" />
+      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectDown" />
+
       <handler event="keypress" keycode="VK_HOME" modifiers="shift" command="cmd_selectBeginLine" />
       <handler event="keypress" keycode="VK_END" modifiers="shift" command="cmd_selectEndLine" />
-      <handler event="keypress" keycode="VK_UP" modifiers="shift" command="cmd_selectLinePrevious" />
-      <handler event="keypress" keycode="VK_DOWN" modifiers="shift" command="cmd_selectLineNext" />
       <handler event="keypress" key="y" modifiers="accel" command="cmd_redo"/>
     </handlers>
   </binding>
 
   <binding id="editor">
     <handlers>
 #include ../editor-base.inc
       <handler event="keypress" key="a" command="cmd_selectAll" modifiers="accel"/>
       <handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cutOrDelete"/>
       <handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_deleteWordForward"/>
       <handler event="keypress" keycode="VK_INSERT" modifiers="control" command="cmd_copy"/>
       <handler event="keypress" keycode="VK_INSERT" modifiers="shift" command="cmd_paste"/>
       <handler event="keypress" keycode="VK_BACK" modifiers="alt" command="cmd_undo"/>
       <handler event="keypress" keycode="VK_BACK" modifiers="alt,shift" command="cmd_redo"/>
-      <handler event="keypress" keycode="VK_LEFT" modifiers="accel" command="cmd_wordPrevious"/>
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="accel" command="cmd_wordNext"/>
-      <handler event="keypress" keycode="VK_LEFT" modifiers="shift,accel" command="cmd_selectWordPrevious"/>
-      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,accel" command="cmd_selectWordNext"/>
+
+      <handler event="keypress" keycode="VK_LEFT" modifiers="accel" command="cmd_moveLeft2"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="accel" command="cmd_moveRight2"/>
+      <handler event="keypress" keycode="VK_LEFT" modifiers="shift,accel" command="cmd_selectLeft2"/>
+      <handler event="keypress" keycode="VK_RIGHT" modifiers="shift,accel" command="cmd_selectRight2"/>
+
+      <handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_moveUp2"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_moveDown2"/>
+      <handler event="keypress" keycode="VK_UP" modifiers="shift,accel" command="cmd_selectUp2"/>
+      <handler event="keypress" keycode="VK_DOWN" modifiers="shift,accel" command="cmd_selectDown2"/>
+
       <handler event="keypress" keycode="VK_HOME" modifiers="shift,control" command="cmd_selectTop"/>
       <handler event="keypress" keycode="VK_END" modifiers="shift,control" command="cmd_selectBottom"/>
       <handler event="keypress" keycode="VK_HOME" modifiers="control" command="cmd_moveTop"/>
       <handler event="keypress" keycode="VK_END" modifiers="control" command="cmd_moveBottom"/>
-      <handler event="keypress" keycode="VK_BACK" modifiers="control"
-        command="cmd_deleteWordBackward"/>
+      <handler event="keypress" keycode="VK_BACK" modifiers="control" command="cmd_deleteWordBackward"/>
 
       <handler event="keypress" keycode="VK_HOME" command="cmd_beginLine"/>
       <handler event="keypress" keycode="VK_END" command="cmd_endLine"/>
       <handler event="keypress" keycode="VK_HOME" command="cmd_selectBeginLine" modifiers="shift"/>
       <handler event="keypress" keycode="VK_END" command="cmd_selectEndLine" modifiers="shift"/>
       <handler event="keypress" keycode="VK_PAGE_UP" command="cmd_movePageUp"/>
       <handler event="keypress" keycode="VK_PAGE_DOWN" command="cmd_movePageDown"/>
       <handler event="keypress" keycode="VK_PAGE_UP" modifiers="shift" command="cmd_selectPageUp"/>