sr=kin@netscape.com
r=akkana@netscape.com
This commit is contained in:
anthonyd%netscape.com 2001-01-09 23:22:56 +00:00
Родитель a844d5f7f1
Коммит 101cc14924
8 изменённых файлов: 22 добавлений и 8 удалений

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

@ -117,6 +117,7 @@
<handler event="keypress" keycode="VK_RIGHT" modifiers="meta" command="cmd_wordNext" />
<handler event="keypress" keycode="VK_LEFT" modifiers="shift,meta" command="cmd_selectWordPrevious" />
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift,meta" command="cmd_selectWordNext" />
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_deleteCharForward" />
</handlers>
</binding>

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

@ -147,7 +147,7 @@
<handler event="keypress" key="v" modifiers="control" command="cmd_paste"/>
<handler event="keypress" key="z" modifiers="control" command="cmd_undo"/>
<handler event="keypress" key="r" modifiers="control" command="cmd_redo"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_deleteCharForward"/>
<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_INSERT" modifiers="shift" command="cmd_paste"/>

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

@ -89,7 +89,7 @@
<binding id="editor">
<handlers>
<handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_cut"/>
<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_INSERT" modifiers="shift" command="cmd_paste"/>

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

@ -230,9 +230,15 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
break;
case nsIDOMKeyEvent::DOM_VK_DELETE:
if (isAnyModifierKeyButShift)
return NS_OK;
/* on certain platforms (such as windows) the shift key
modifies what delete does (cmd_cut in this case).
bailing here to allow the keybindings to do the cut.*/
PRBool isShiftModifierKey;
rv = keyEvent->GetShiftKey(&isShiftModifierKey);
if (NS_FAILED(rv)) return rv;
if (isAnyModifierKeyButShift || isShiftModifierKey)
return NS_OK;
mEditor->DeleteSelection(nsIEditor::eNext);
ScrollSelectionIntoView(mEditor);
aKeyEvent->PreventDefault(); // consumed

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

@ -230,9 +230,15 @@ nsTextEditorKeyListener::KeyPress(nsIDOMEvent* aKeyEvent)
break;
case nsIDOMKeyEvent::DOM_VK_DELETE:
if (isAnyModifierKeyButShift)
return NS_OK;
/* on certain platforms (such as windows) the shift key
modifies what delete does (cmd_cut in this case).
bailing here to allow the keybindings to do the cut.*/
PRBool isShiftModifierKey;
rv = keyEvent->GetShiftKey(&isShiftModifierKey);
if (NS_FAILED(rv)) return rv;
if (isAnyModifierKeyButShift || isShiftModifierKey)
return NS_OK;
mEditor->DeleteSelection(nsIEditor::eNext);
ScrollSelectionIntoView(mEditor);
aKeyEvent->PreventDefault(); // consumed

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

@ -117,6 +117,7 @@
<handler event="keypress" keycode="VK_RIGHT" modifiers="meta" command="cmd_wordNext" />
<handler event="keypress" keycode="VK_LEFT" modifiers="shift,meta" command="cmd_selectWordPrevious" />
<handler event="keypress" keycode="VK_RIGHT" modifiers="shift,meta" command="cmd_selectWordNext" />
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_deleteCharForward" />
</handlers>
</binding>

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

@ -147,7 +147,7 @@
<handler event="keypress" key="v" modifiers="control" command="cmd_paste"/>
<handler event="keypress" key="z" modifiers="control" command="cmd_undo"/>
<handler event="keypress" key="r" modifiers="control" command="cmd_redo"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_cut"/>
<handler event="keypress" keycode="VK_DELETE" modifiers="shift" command="cmd_deleteCharForward"/>
<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_INSERT" modifiers="shift" command="cmd_paste"/>

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

@ -89,7 +89,7 @@
<binding id="editor">
<handlers>
<handler event="keypress" keycode="VK_DELETE" modifiers="control" command="cmd_cut"/>
<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_INSERT" modifiers="shift" command="cmd_paste"/>