20498, 22446: up/down arrows in text fields, Mac key for redo, and some other problems we noticed. r=brade,a=don

This commit is contained in:
akkana%netscape.com 1999-12-22 23:54:24 +00:00
Родитель 213c52783c
Коммит beeb34ac5b
7 изменённых файлов: 53 добавлений и 19 удалений

Просмотреть файл

@ -95,12 +95,12 @@
var controller =
document.commandDispatcher.getControllerForCommand('cmd_selectLineNext');
controller.doCommand('cmd_selectLineNext');"/>
<key id="key_undo" key="z" xulkey="true" shift="false" control="false"
<key id="key_undo" key="z" xulkey="true" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_undo');
controller.doCommand('cmd_undo');"/>
<key id="key_undo" key="y" xulkey="true" shift="false" control="false"
<key id="key_redo" key="y" xulkey="true" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_redo');

Просмотреть файл

@ -76,12 +76,12 @@
var controller =
document.commandDispatcher.getControllerForCommand('cmd_scrollPageDown');
controller.doCommand('cmd_scrollPageDown');"/>
<key id="key_undo" key="z" xulkey="true" shift="false" control="false"
<key id="key_undo" key="z" xulkey="true" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_undo');
controller.doCommand('cmd_undo');"/>
<key id="key_undo" key="y" xulkey="true" shift="false" control="false"
<key id="key_redo" key="y" xulkey="true" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_redo');

Просмотреть файл

@ -8,15 +8,12 @@
<!-- Mac-specific key bindings -->
<keyset id="editorKeySet" xulkey="meta">
<key id="macRedokb" key="Z" xulkey="true" shift="true" control="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
controller.doCommand('cmd_redo');"/>
<key id="macHomekb" keycode="VK_HOME" control="false" shift="false"
<!-- Mac bindings for home and end -->
<key id="macHomekb" keycode="VK_HOME" shift="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_scrollTop');
controller.doCommand('cmd_scrollTop');"/>
<key id="macEndkb" keycode="VK_END" control="false" shift="false"
<key id="macEndkb" keycode="VK_END" shift="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_scrollBottom');
controller.doCommand('cmd_scrollBottom');"/>

Просмотреть файл

@ -8,10 +8,14 @@
<!-- Mac-specific key bindings -->
<keyset id="editorKeySet" xulkey="meta">
<!-- replace the Windows/Unix xul-Y Redo binding with xul-shift-Z -->
<key id="noWinRedo" key="y" xulkey="true" shift="false" cancel="true"/>
<key id="macRedokb" key="Z" xulkey="true" shift="true" control="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
controller.doCommand('cmd_redo');"/>
<!-- Mac bindings for home and end -->
<key id="macHomekb" keycode="VK_HOME" control="false" shift="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_scrollTop');

Просмотреть файл

@ -8,17 +8,26 @@
<!-- Mac-specific key bindings -->
<keyset id="editorKeySet" xulkey="meta">
<key id="macRedokb" key="Z" xulkey="true" shift="true" control="false"
<!-- replace the Windows/Unix xul-Y Redo binding with xul-shift-Z -->
<key id="noWinRedo" key="y" xulkey="true" shift="false" cancel="true"/>
<key id="macRedokb" key="Z" xulkey="true" shift="true"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
controller.doCommand('cmd_redo');"/>
<key id="macHomekb" keycode="VK_HOME" control="false" shift="false"
<!-- In single-line text fields, ignore the xp bindings for home and end -->
<key id="macHomekb" keycode="VK_HOME" shift="false" cancel="true">
<key id="macEndkb" keycode="VK_END" shift="false" cancel="true">
<!-- and make up and down arrows do those functions -->
<key id="key_up" keycode="VK_UP" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_beginLine');
controller.doCommand('cmd_beginLine');"/>
<key id="key_down" keycode="VK_DOWN" shift="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_beginLine');
controller.doCommand('cmd_beginLine');"/>
<key id="macEndkb" keycode="VK_END" control="false" shift="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_endLine');
var controller =
document.commandDispatcher.getControllerForCommand('cmd_endLine');
controller.doCommand('cmd_endLine');"/>
</keyset>

Просмотреть файл

@ -8,10 +8,14 @@
<!-- Mac-specific key bindings -->
<keyset id="editorKeySet" xulkey="meta">
<!-- replace the Windows/Unix xul-Y Redo binding with xul-shift-Z -->
<key id="noWinRedo" key="y" xulkey="true" shift="false" cancel="true"/>
<key id="macRedokb" key="Z" xulkey="true" shift="true" control="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_redo');
controller.doCommand('cmd_redo');"/>
<!-- Mac bindings for home and end -->
<key id="macHomekb" keycode="VK_HOME" control="false" shift="false"
onkeypress="
var controller = document.commandDispatcher.getControllerForCommand('cmd_scrollTop');

Просмотреть файл

@ -66,6 +66,26 @@
var controller =
document.commandDispatcher.getControllerForCommand('cmd_selectWordNext');
controller.doCommand('cmd_wordNext');"/>
<key id="key_up" keycode="VK_UP" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_linePrevious');
controller.doCommand('cmd_linePrevious');"/>
<key id="key_down" keycode="VK_DOWN" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_lineNext');
controller.doCommand('cmd_lineNext');"/>
<key id="key_up_shift" keycode="VK_UP" shift="true"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_selectLinePrevious');
controller.doCommand('cmd_selectLinePrevious');"/>
<key id="key_down_shift" keycode="VK_DOWN" shift="true"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_selectLineNext');
controller.doCommand('cmd_selectLineNext');"/>
<key id="key_pageup" keycode="VK_PAGE_UP" shift="false" control="false"
onkeypress="
var controller =
@ -76,12 +96,12 @@
var controller =
document.commandDispatcher.getControllerForCommand('cmd_scrollPageDown');
controller.doCommand('cmd_scrollPageDown');"/>
<key id="key_undo" key="z" xulkey="true" shift="false" control="false"
<key id="key_undo" key="z" xulkey="true" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_undo');
controller.doCommand('cmd_undo');"/>
<key id="key_undo" key="y" xulkey="true" shift="false" control="false"
<key id="key_redo" key="y" xulkey="true" shift="false"
onkeypress="
var controller =
document.commandDispatcher.getControllerForCommand('cmd_redo');