This answer has tips on how to do it on Gnome or Vim, but these don't work on KDE. This bug shows that KDE don't support the ISO notation with Ctrl+Shift plus the character's hex code. Is there any other way I can do this with a keyboard (that is, without copying and pasting)?
Linux – How to type unicode characters in KDE
input-devicekdekeyboardlinuxunicode
Related Solutions
I think it'd be most useful if I took this a piece at a time. The general problem is: who is the key press intended for? The terminal, or the program running inside the terminal?
As an example, "screen", which is kindof a terminal, uses Ctrl+A as a prefix for its commands, to distinguish them from things going to the running program itself. (And provides a way to send Ctrl+A.)
gnome-terminal
has several keys that it captures to do various things, including some of the ones you ask about.
Also keep in mind that a terminal's "highlighting" is separate from the terminal's cursor position. Some terminals have no ability to highlight at all.
Now, taking this key combinations at a time:
left+right arrows to move left+right ctrl+arrow to move an entire word home/end to move to start/end of line
Move what left and right? Bash can be configured to do this, and typically is by default. Typically, these move the cursor position.
ctrl+c/ctrl+v to copy/paste
First: does copy/paste even make sense? If you're at a VT, you don't really have a clipboard, especially if X isn't running.
Some terminals can copy text in the output, and some will also "paste" by simulating you typing the contents of the clipboard. Ctrl+Shift+V, for example, is paste in gnome-terminal
, which may help. (And Ctrl+Shift+C is copy.) As discussed earlier, the big problem with Ctrl+C and Ctrl+V is they overlap with common terminal/program commands. (Ctrl+C is send interrupt (SIGINT) and Ctrl+V is verbatim.)
Some terminals also support two modes of copying data: a more normal "just copy", and what's known as "block select" or "block copy". (Hold Ctrl, and then drag while in gnome-terminal
for example.)
Additionally, xsel -b
can be used to pipe clipboard contents around. Depends on the exact situtation whether xsel
or the terminal's version of paste is more useful. See man xsel
.
shift+arrow to highlight text shift+ctrl+arrow to highlight an entire word
Your terminal's highlight (if it has this capability) is separate from cursor position. Again, lack of available key combos is probably a factor. Keep in mind a highlight has two positions: either the start and end, or the upper left and lower right corners. How do you manage both?
Finally, note that many GUI terminals, double-clicking a word will highlight it. (And in X, copy to the primary selection.)
screen
, as an example, has keys to switch into a mode for moving around the buffer (previous output) and copy/pasting.
I think if you make adequate use of xsel
and the primary selection, you will find clipboard operations are both rare enough and complex enough to merit using the mouse.
The basic Italian keyboard layout as shipped with Windows 7 has no way of typing the backtick (`) or the tilde (~). I checked this using Microsoft Keyboard Layout Creator (MSKLC), with that layout loaded into it. I presume that this layout is more or less standard in Italy, though of course Microsoft might have its own oddities here.
However, in Windows 7, there is a somewhat different layout called “Italian (142)”. In it, the backtick can be typed using AltGr + and the tilde using AltGr §. Here “+” and “§” refer to the keys labeled so in the picture in the question, i.e. two keys to the right of “P” and three keys to the right of “L”. I suppose this “Italian (142)” might be some kind of “Italian programmer’s keyboard”, or just a variant keyboard, possibly reflecting different physical keyboards.
If you are using Windows (as I guess because you mentioned “Control Panel”), consider downloading MSKLC and using it to create a modified Italian keyboard layout that suits your needs, and use it as the normal layout, with no need for switching between layouts. You could e.g. make AltGr ' produce the backtick and AltGr ^ produce the tilde; these should be relatively easy to remember due to similarity of characters.
As to the “why” question (why basic Italian layout lacks those characters), I would say that keyboards are primarily designed for typing texts in natural languages, and Italian has little use for those characters. The layout has keys for à, è, ì, ò, ù, so there is no need for a backtick key acting as a dead key (diacritic key) for typing vowel + grave accent combinations, as in many other European keyboards. And while other Romance languages have letters with a tilde, like ã and ñ, Italian does not.
Best Answer
Memorising hexcodes is madness. Use the compose key instead. It lets you combine characters in a mnemonic way. This is a feature of X, not just KDE, thus works everywhere. Some examples:
Each key is typed sequentially without holding down. See the file
/usr/share/X11/locale/en_US.UTF-8/Compose
(online, 124 KiB) for the whole list. You can define your own compose sequences in your~/.XCompose
file (example).Since I do not have a Sun keyboard, I do not have a physical Compose key. I remap the useless Caps Lock key as logical Compose key. Change this in System Settings → Region/Language → Keyboard Layout (kxkb applet) → tab Advanced → section Compose key position, or run the command
setxkbmap -option compose:caps
.