diff --git a/doc/manual/index.docbook b/doc/manual/index.docbook --- a/doc/manual/index.docbook +++ b/doc/manual/index.docbook @@ -12,6 +12,7 @@ &Jonathan.Singer; &Jonathan.Singer.mail; &Kurt.Hindenburg; &Kurt.Hindenburg.mail; + &Robert.Knight; &Robert.Knight.mail; @@ -42,9 +43,14 @@ &Kurt.Hindenburg; + + &FDLNotice; -2018-03-10 +2018-04-03 Applications 18.04 &konsole; is &kde;'s terminal emulator. @@ -1320,6 +1326,182 @@ + +Terminal Key Bindings + + +How &konsole; Uses Key Bindings + + +Introduction +&konsole; uses *.keytab files to translate key combinations into control characters and escape sequences that are sent to the shell or to interactive programs (typically programs that use the Alternate Screen buffer, e.g. vim, less, screen) running in the shell. + +Users can customize the key bindings settings in &konsole; using the Key Bindings Editor. A key combination can be configured to send a specific control or escape sequence to the terminal. + +You can open the Key Bindings Editor from the menu entry SettingsEdit Current Profile, and going to the Keyboard tab. Listed there are the Key Bindings schemas that come by default with &konsole;. + + + +Key Combinations and Modes + +Key combinations follow the pattern: +Key (+|-) Modes + + +for example: + +Up+Shift+AppScreen +Down+Shift-AppScreen +Space+Ctrl + + + +Key names are defined in the qnamespace.h header file, with the Qt::Key_ prefix removed, for a list of key names check the Qt::Key enumeration in the &Qt; documentation. + +A + preceding a Mode name means that mode is set; for a modifier key, that means it's pressed, whereas for all other modes it means that particular mode is in effect (i.e. active). For example +Ctrl means the key combination will work only if the Ctrl key is pressed. + +A - preceding a Mode name means that mode is reset; basically this is the opposite of putting + before a Mode name, so for a modifier key that means the key isn't pressed, whereas for all other modes it means that particular mode is inactive. For example -Ctrl means the key combination will work only if the Ctrl keys is not pressed. + + +If a Mode name isn't present in a key combination, its state is ignored. + + +The supported Key Bindings modes are listed below: + + + + +Alt, Ctrl, Shift + +One or more of these Modes can be used in a key combination, if any of them is set, the key combination uses that modifier key, respectively; and vice versa if it's reset + + + + +AnyModifier + +If this mode is set, the key combination uses any modifier key (any of the previous three modifier keys); and vice versa if it's reset + + + + +Ansi + +If this mode is set, &konsole; will send ANSI escape and control sequences +If this mode is reset &konsole; will send VT52 escape and control sequences + + + + +AppScreen + +If this mode is set, the key combination will only affect interactive programs that use the Alternate Screen buffer +If this mode is reset the key combination will only affect the terminal when it's using the Normal Screen buffer + + +&konsole; makes use of two screen buffers: + + +The Normal Screen buffer (default): allows you to scroll back to view previous lines of output, this is the default buffer you usually use to execute commands... etc + + +The Alternate Screen buffer: the terminal switches to this buffer when you run an interactive program (e.g. less, vim, screen, tmux... etc) + + + + + + + + +KeyPad + +If this mode is set, the key combination uses a key on the Keypad (Number Pad). This mode is useful to distinguish between keys on the keyboard and keys on the Keypad. For example when Num Lock is on you can configure two separate key combinations, one using the key labelled 1 on the keyboard (usually under the F1 key) and the other using the key labelled 1 on the Keypad. The same concept applies when Num Lock is off for the End, Home, Cursor Keys ...etc on the Keypad + + + + +AppCursorKeys + +This mode implements the VT100 Cursor Keys Mode (DECCKM). It controls the escape sequences each Cursor Key (Up, Down, Right, Left) sends, depending on whether this mode is set or reset +By default &konsole; follows the XTerm behavior of treating the Home and End keys as cursor keys with respect to DECCKM + + + + +AppKeyPad + +If this mode is set, the key combination will only work when the Keypad is in Application Mode (DECKPAM) +If this mode is reset, the key combination will only work when the Keypad is in Numeric Mode (DECKPNM) + + + + + +Note that each combination of Key and Modes (set/reset) must be unique. For example, consider the following two rules: + + +A+Shift : A +a : a + +&konsole; will not accept the small letter a rule, you have to add a -Shift to that rule to make it work. + + + +The Output Field + +In the Output field you can add the escape sequences or control characters that you want &konsole; to send to the terminal when the associated key combination is pressed. + +You can also use any of the following keywords, each of which has a special meaning in &konsole;: + + +scrollUpLine : scroll up one line in the shell history scrollback buffer +scrollUpPage : scroll up one page in the shell history scrollback buffer +scrollDownLine : scroll down one line in the shell history scrollback buffer +scrollDownPage : scroll down one page in the shell history scrollback buffer +scrollUpToTop : scroll up to the begining of the shell history scrollback buffer +scrollDownToBottom : scroll down to the end of the shell history scrollback buffer + + +You can also use strings with C-string syntax; you may use the following escapes sequences: + + +\E : Escape +\\ : Backslash +\" : Double quote +\t : Tab +\r : Return +\n : Newline +\b : Backspace + +\xHH : where HH are two hex digits + +This can be used to send ASCII control characters, e.g. \x00 which is the NUL character + + + + + + + +Further Reading +For more information on escape sequences and control characters, check the following documentation: + + +The VT100 user guide + + +The VT102 user guide + + +The comprehensive and indispensable XTerm Control Sequences documentation + + + + + + + Using Style Sheet for the Tab Bar diff --git a/src/EditProfileDialog.ui b/src/EditProfileDialog.ui --- a/src/EditProfileDialog.ui +++ b/src/EditProfileDialog.ui @@ -826,7 +826,7 @@ - Key bindings control how combinations of keystrokes in the terminal window are converted into the stream of characters which are sent to the current terminal program. + Key bindings control how combinations of keystrokes in the terminal window are converted into the stream of characters that is then sent to the current terminal program. For more information on how to customize the key bindings check the Konsole Handbook. true