зеркало из https://github.com/mozilla/gecko-dev.git
fix for bug #59003 fix for keybindings
sr=kin@netscape.com r=akkana@netscape.com
This commit is contained in:
Родитель
a844d5f7f1
Коммит
101cc14924
|
@ -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"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче