Книга: Learning GNU Emacs, 3rd Edition

10.4.1 Special Keys

10.4.1 Special Keys

A more complicated keyboard customization task is binding commands to special keys, such as arrow, numeric keypad, or function keys, on your keyboard. This level of customization takes some work, but if you like using special keys, it is well worth the effort.

Most of the special keys have reasonable names, but using them with the set key functions discussed above requires using a slightly different syntax. The name of the key appears inside square brackets rather than inside double quotes. For example, you could bind the goto-line command to the function key F5 like this:

(global-set-key [f5] 'goto-line)

And you can certainly use modifiers with your special keys. Control-Alt-F5 can be bound like this:

(global-set-key [C-A-f5] 'goto-line)

Table 10-3 lists the names of some common special keys.

Table 10-3. Special key ELisp names

ELisp Name Key
DEL or backspace Backspace
delete Delete key
down Down arrow key
end End key
f1 .. f35 Function keys F1 through F35
home Home key
help Help key
kp-0 .. kp-9 Keypad numbers 0 through 9
kp-enter Enter key on the number pad
left Left arrow key
next Page Down
prior Page Up
right Right arrow key
up Up arrow key

Оглавление книги

Оглавление статьи/книги

Генерация: 0.132. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз