summaryrefslogtreecommitdiff
path: root/docs/help/in/bind.in
blob: d48dcd69dac54fa3f89b022ada3d9239f6945444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

@SYNTAX:bind@

Bind some action to specified keystroke. Remember that all characters
in keystrokes are case-sensitive! Uppercase letter usually means that
you need to keep SHIFT pressed to get the key to work.

Most most commonly used keystrokes are:

 ^X - Ctrl-X
 meta-x - Meta-x (Meta is quite often Alt-key in PCs, ESC-x works too)

Irssi has by default also defined several other keys which you can use:

 return                  - The return/enter key
 space, backspace        - Space / backspace
 up, down, left, right   - Arrow keys
 cleft, cright           - Ctrl-left/right
 home, end, prior, next  - prior = Page Up, next = Page Down
 insert, delete

The keystroke can contain as many key presses as you want, and you can
define names for different key sequences to use them more easily (the
keys above are done like that). For example, you may want to manage
windows with ^W key, so that ^W^C creates new window, ^W^K kills the
active window, etc. you may do it like:

 /BIND ^W^C /WINDOW NEW HIDE
 /BIND ^W^K /WINDOW KILL

But maybe you wish to give these binds to other people who want to use
some other key than ^W, then it would be better done as:

 /BIND ^W key window
 /BIND window-^C /WINDOW NEW HIDE
 /BIND window-^K /WINDOW KILL


To get a list of all bindable commands use /bind -list.

Examples:

Clear screen:
  /BIND meta-c /CLEAR

People with qwertz layout probably want to swap meta-y and meta-z:
  /BIND meta-z change_window 16
  /BIND -delete meta-y