mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Terminal: Bug 434939 - Keybinding conflicts when installing into JEE
The "Alt+V" key binding reported an error when installed into the Eclipse JEE package. This is resolved by making our TerminalContext a child of the Eclipse Window context. At the same time, provide better human-readable labels for the Terminal Edit Context (menu on Terminal Widget) and Terminal Typing Context. And, register more Alt+Char key bindings after carefully reviewing existing Eclipse Main Menus, shortcuts and expected readline support. Change-Id: I91c932cce428f7a7a3fa829d7776baa135474330 Signed-off-by: Martin Oberhuber <martin.oberhuber@windriver.com>
This commit is contained in:
parent
1b545a04e8
commit
584a99aecd
3 changed files with 46 additions and 8 deletions
|
@ -21,8 +21,11 @@
|
|||
pluginName = Target Management Terminal Widget
|
||||
providerName = Eclipse TM Project
|
||||
|
||||
terminal.context.name=Terminal widget context
|
||||
terminal.context.description=Override ALT+x menu access keys
|
||||
terminal.context.name.edit=Terminal Widget in Focus
|
||||
terminal.context.description.edit=Show modified keyboard shortcuts in context menu
|
||||
|
||||
terminal.context.name.terminal=Terminal Typing Connected
|
||||
terminal.context.description.terminal=Override ALT+x menu access keys while typing into the Terminal
|
||||
|
||||
terminal.insertion.description=Terminal view insertion
|
||||
terminal.insertion.name=Terminal view insert
|
||||
|
|
|
@ -14,18 +14,20 @@
|
|||
# Martin Oberhuber (Wind River) - [378691][api] push Preferences into the Widget
|
||||
# Martin Oberhuber (Wind River) - [434294] Add Mac bindings with COMMAND
|
||||
# Martin Oberhuber (Wind River) - [434487] Add key bindings for "maximize view" and "quick access"
|
||||
# Martin Oberhuber (Wind River) - [434939] Fix Keybinding conflicts with JEE Luna package
|
||||
-->
|
||||
<plugin>
|
||||
<extension-point id="terminalConnectors" name="Terminal Connectors" schema="schema/terminalConnectors.exsd"/>
|
||||
<extension point="org.eclipse.ui.contexts">
|
||||
<context
|
||||
name="%terminal.context.name"
|
||||
description="%terminal.context.description"
|
||||
name="%terminal.context.name.terminal"
|
||||
description="%terminal.context.description.terminal"
|
||||
parentId="org.eclipse.ui.contexts.window"
|
||||
id="org.eclipse.tm.terminal.TerminalContext"
|
||||
/>
|
||||
<context
|
||||
name="%terminal.context.name"
|
||||
description="%terminal.context.description"
|
||||
name="%terminal.context.name.edit"
|
||||
description="%terminal.context.description.edit"
|
||||
parentId="org.eclipse.ui.contexts.window"
|
||||
id="org.eclipse.tm.terminal.EditContext" />
|
||||
</extension>
|
||||
|
@ -72,6 +74,21 @@
|
|||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+A"/> <!-- Search -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+B"/> <!-- Readline word-left: just to be safe -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+C"/> <!-- ClearCase, Extract Constant -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+D"/> <!-- Design, Diagram, Debug -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
|
@ -86,12 +103,17 @@
|
|||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+G"/>
|
||||
sequence="Alt+G"/> <!-- Tar&get -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+H"/> <!-- Help -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+L"/> <!-- Ana&lyze -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
|
@ -101,7 +123,7 @@
|
|||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+P"/> <!-- Project -->
|
||||
sequence="Alt+P"/> <!-- Project, Papyrus, Ping -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
|
@ -127,6 +149,11 @@
|
|||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+W"/> <!-- Window -->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+Y"/> <!-- S&ystem -->
|
||||
<!--
|
||||
For Copy and Paste, we need replacements since the default Ctrl+C / Ctrl+V
|
||||
need to go to the terminal and thus are not available for local Copy and Paste.
|
||||
|
|
|
@ -872,9 +872,14 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
|||
|
||||
protected class TerminalKeyHandler extends KeyAdapter {
|
||||
public void keyPressed(KeyEvent event) {
|
||||
//TODO next 2 lines are probably obsolete now
|
||||
if (getState()==TerminalState.CONNECTING)
|
||||
return;
|
||||
|
||||
//TODO we should no longer handle copy & paste specially.
|
||||
//Instead, we should have Ctrl+Shift always go to local since there is no escape sequence for this.
|
||||
//On Mac, Command+Anything already goes always to local.
|
||||
//Note that this decision means that Command will NOT be Meta in Emacs on a Remote.
|
||||
int accelerator = SWTKeySupport.convertEventToUnmodifiedAccelerator(event);
|
||||
if (editActionAccelerators.isCopyAction(accelerator)) {
|
||||
copy();
|
||||
|
@ -1094,6 +1099,9 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
|||
character = '\u0000';
|
||||
}
|
||||
|
||||
//TODO: At this point, Ctrl+M sends the same as Ctrl+Shift+M .
|
||||
//This is undesired. Fixing this here might make the special Ctrl+Shift+C
|
||||
//handling unnecessary further up.
|
||||
sendChar(character, altKeyPressed);
|
||||
|
||||
// Special case: When we are in a TCP connection and echoing characters
|
||||
|
|
Loading…
Add table
Reference in a new issue