![]() The disadvantage of the change is of course that both the TTY keymapping as well as the default application behaviour had to be changed. control-F for find, or perhaps control-H for help).įor this reason, the behaviour was changed again, to the following mapping, which is now the default in most Linux distributions: The disadvantage of the X-term behaviour was that control-H could not be used by applications just like other control-shortcuts by GUI applications (e.g. ![]() This is slightly more logical, and the advantage was that the mapping of TTY character to application behaviour did not have to be changed. The X-term emulation of VT100 did it differently: So the delete key was undefined and not the backspace key but control-H was mapped to the BS (backspace) character. Originally, VT100 defined the keymapping: This is configured on the machine where the application runs (this may be a remote machine). The mapping of a character sequence to a certain behaviour by an application, such as the shell (bash, tcsh, zsh) or editor (vi, emacs).The mapping of a keystroke to a character sequence in the terminal (tty).In fact, there are two mappings to take into account: The mapping of the backspace and delete key to a given application behaviour has differed in the course of time, and per terminal and application. In a terminal or editor, pressing the backspace results in a delete command, or vice versa. Now you can kill word-by-word (from right to left aka backwards) by hitting Option-Backspace.Sometimes the backspace/delete does not work as expected. Action: “send hex code”, and enter “17” (without the quotes).Add a new mapping (“ ” sign) and configure its parameters: Go to Bookmarks > Manage Profiles… and open Keyboard Profiles > Global (just like in the previous sections). If you want to enable “backward-kill-word”, add another shortcut with the following configuration. Now you can use Option← and Option→ for word movement in iTerm! 4. You can find their explanation among others in the man page of lesskey(1). ![]() The shell escape sequences ESC-b ( \eb, word-left) and ESC-f ( \ef, word-right), respectively, will do the trick. We need two shortcuts in total, one for word movement to the left with Option← and one for word movement to the right with Option→. Ok ok admittedly, you can already see in this screenshot that the shortcuts we are about to add do already exist – I was just too lazy to remove them before taking the picture. Click the button as shown in the screenshot below to add a new shortcut. Now, we will add two new shortcuts to the global keyboard file. Manage Profilesįirst, open the Manage Profiles menu in iTerm. Add the end, you can use Option← and Option→ for word movement to the left and right, respectively (if you prefer the Linux setup, you just use the Ctrl modifier instead of Option in the following steps). It’s quite easy actually and involves just a few steps. I’m not that familiar with shell escape sequences, so I was quite happy when I found out how to use them for adding word movement support to iTerm. One of the things that has always bothered me about iTerm on Mac OS X is the lack of default keyboard shortcuts for moving from word to word like Ctrl← (cursor-left) and Ctrl→ (cursor-right) on standard Linux terminals.
0 Comments
Leave a Reply. |