| Summary: | [terminal] Missing copy & paste keyboard shortcuts in Terminal | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | Rudolf Adamkovic <salutis> | ||||
| Component: | Terminal | Assignee: | Max Weninger <max.weninger> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aleherb+eclipse, eclipse, uwe.st, yevshif | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.5.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 335021 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Rudolf Adamkovic
(In reply to comment #0) > Build Identifier: 20090920-1017 > > I am not able to perform copy & paste in Terminal window on my Mac OS X box. Ah I forgot "with keyboard only". So, as it should be clear: I am not able to perform copy & paste in Terminal window on my Mac OS X box with keyboard only. This is by design! Once the terminal has the focus *all* keyboard events are taken by the terminal. How would you deal with the case where you want to send CTRL+SHIFT+C or CTRL+META+C to the terminal? This is *not* mac specific. So, it is not possible to work with the clipboard with the keyboard only? I don't know about others, but for me it is an issue. Or am I missing something? So, it is not possible to work with the clipboard with the keyboard only? I don't know about others, but for me it is an issue. Shouldn't it be fixed? I think so. Sorry for the duplicate comment above. The core requirement is that control sequences are passed on to the terminal for handling. Things like CTRL+C/CTRL+D needs to go to the terminal, otherwise there will be complains that you cannot terminate the terminal using this keyboard sequences. The missing keyboard shortcuts for Copy/Paste in the terminal are inconvenient. There is a second set of standard keyboard shortcuts for Copy (CTRL+Insert) and Paste (Shift+Insert). If these sequences are not associated with common terminal functionality, it might be OK to handle them on the host instead of the terminal to solve this inconvenience. Michael, comments? (In reply to comment #6) > There is a second set of standard keyboard shortcuts for Copy (CTRL+Insert) and > Paste (Shift+Insert). If these sequences are not associated with common > terminal functionality, it might be OK to handle them on the host instead of > the terminal to solve this inconvenience. BTW, don't forget that there is no Insert key on Mac. That will make it obviously difficult on Mac to use them. Are there alternate keyboard shortcut assignments in the Eclipse keys preferences for Copy/Cut/Paste on Mac? Sorry to ask, I'm not blessed with a Mac :). There are only CMD+C, CMD+X and CMD+V as I can see in Keys section. As Michael said, having the Terminal send all key commands to the remote is by design. I am not aware of any other Terminal program that would interpret such key sequences locally (thinking about Hyperterm, Teraterm, Putty on Windows; minicom on Linux; even xterm) but perhaps I am missing something. If you do want to use the clipboard, you should enable the optional terminal input line (right-click, toggle command input field). This provides full copy & paste support, plus local editing and a local history of commands. Also, on Windows keyboards, the special "show contextmenu" key is available. Before moving forward with any specific patches / enhancements, I would like to see an example how another Terminal program handles this with the keyboard. If such an example does not exist, I'd resolve this as WONTFIX. PS: If you do use the clipboard, where do you copy from? How do you move around? I suppose you'd be using the mouse for this, no? BTW, there on Mac CMD is used instead of CTRL for copy/cut/paste shortcuts. So, on the Mac there is no problem to do CTRL+C in Terminal. The problem is with CMD+C, which is not handled in Terminal window anyway (CMD is used only on Mac). Martin, Putty in example is supporting "copy on mark/select". So you can copy/paste from/to the terminal using a common usage pattern. Eclipse users are used to their keyboard shortcuts (CMD or CTRL or ...), so you inherit a usage pattern a common terminal does not have. The Eclipse integrated terminal on the other hand does not support "copy on mark/select" and "paste on middle mouse button", AFAIK. So the inconvenient is real as neither Eclipse common way nor the external terminal way (Putty) is available. (In reply to comment #13) Can you explain how the "copy on mark/select" feature works? And yes, the TM Terminal does support "Paste on middle mouse button" :) Regarding the concrete case on the Mac: When Cmd is in fact specific for the Mac only such that it never makes any sense sending it to the remote, then there is a case for supporting shortcuts with Cmd. I would still like to know about one terminal program who does this; and, since none of the active committers has any Mac to develop / test this on, could you do some work yourself? Setting up Eclipse for looking at the plugin is easy: 1. Download http://www.eclipse.org/dsdp/tm/development/terminal-anonymous.psf to a local file 2. File > Import > Team > Team Project Set : point to the downloaded file : will import from CVS (takes a while -- enter user:anonyous, passwd: foo@bar) 3. Look at plugin org.eclipse.tm.terminal VT100TerminalControl.TerminalFocusListener.focusGained() 4. To test: Run > Debug Configurations... : Select "Eclipse Application", press "New" button : press Run On Mac it should be CMD+C/X/V. It is standard and there is no collision with the programs run in terminal, because they don't know about CMD key. About middle-click paste, there is no 3rd (middle) button on many Apple's HW and it is not possible to emulate it with left & right click, because of HW limitations (there is only one HW button in the mouse and a special sensor to detect which finger is clicking). So, on the Apple's HW it should be simple CMD+C/X/V. (In reply to comment #14) >Can you explain how the "copy on mark/select" feature works? You just select the text to copy in the terminal window and it is immediately available in the application/system clipboard. Open a editor, press CTRL+V, and it is done. >And yes, the TM Terminal does support "Paste on middle mouse button" :) Nice :) (In reply to comment #15) > On Mac it should be CMD+C/X/V. It is standard and there is no collision with > the programs run in terminal, because they don't know about CMD key. About > middle-click paste, there is no 3rd (middle) button on many Apple's HW and it > is not possible to emulate it with left & right click, because of HW > limitations (there is only one HW button in the mouse and a special sensor to > detect which finger is clicking). So, on the Apple's HW it should be simple > CMD+C/X/V. Is there a Meta key on a Mac? We need SHIFT, CONTROL and META... I guess the CMD key is mapped to META on a mac... (In reply to comment #17) > (In reply to comment #15) > > Is there a Meta key on a Mac? We need SHIFT, CONTROL and META... I guess the > CMD key is mapped to META on a mac... There are SHIFT, CTRL, ALT and CMD. > There are SHIFT, CTRL, ALT and CMD.
and eclipse sees all 4 of them as distinct modifiers? (ALT and CMD are not interchangeable within eclipse)
looking into org.eclipse.swt.SWT there is only ALT CTRL and SHIFT. I do not se a way to access the apple CMD modifier... (In reply to comment #19) > > There are SHIFT, CTRL, ALT and CMD. > > and eclipse sees all 4 of them as distinct modifiers? (ALT and CMD are not > interchangeable within eclipse) Yes. In Preferences->Keys I can see the difference in CTRL, ALT and CMD when redefining shortcut for Copy, for example. Every key has its own symbol there. oops there is also org.eclipse.swt.SWT.COMMAND -- that could then be used.... oops there is also org.eclipse.swt.SWT.COMMAND -- that could then be used.... Created attachment 157285 [details]
The difference between CTRL, ALT and CMD
(In reply to comment #16) > You just select the text to copy in the terminal window and it is immediately > available in the application/system clipboard. Open a editor, press CTRL+V, and > it is done. This doesn't work with latest builds on Windows (maybe due to the changes needed for bug 335021) - and it's actually unexpected on Windows. I think we should try to enable CMD-C / CMD-V on the Mac unconditionally. Regarding Ctrl-C / Ctrl-V on Windows it's harder since users may expect that key sequence to be actually sent to the target. It could be a setting in the Terminal widget what happens on Ctrl-C / Ctrl-V . Adopters of the Terminal Widget should be able to influence that setting for a connection, since it depends on the kind of application on the remote whether sending Ctrl-C / Ctrl-V to the target makes more sense, or Copy / Paste makes more sense. A global Preference Setting may also make sense. At any rate, note that performing "Copy" by keyboard doesn't help very much since the selection needs to be created by keyboard anyways. In that respect, it's always going to remain different than "Copy" in a VNC session or local view / editor. CQ:WIND00329074 See:ELT Note that this has been implemented in a Fork of the TM Terminal, Google ELT: http://code.google.com/p/elt/ as well as another fork of the TM Terminal, in Aptana Studio: http://www.aptana.com/products/studio3/download It would be great for those forks to contribute back the functionality they have added. It looks like this has actually been implemented for TM 3.5.1: http://git.eclipse.org/c/tm/org.eclipse.tm.git/commit/?id=092531d62dc4a53acef4e383fd1c71ec49eae67f By default, Ctrl+Shift+C is assigned "copy" and Ctrl+Shift+V to "paste". But Preferences > Keys can be used to change the default assignment; I have successfully changed "paste" to Shift+Insert. Max / Uwe can you confirm that the feature is "done" for TM 3.5.1 ? Confirmed. Marking fixed as per TM 3.5.1 then. |