Thse are low level shortcuts that are considered to be used for debugging. Whenever possible, it is recommended to use these instead of doing a hard shutdown (holding power button to shutdown the motherboard).

+

==Standard Shortcuts==

−

+

===Kernel===

−

Must be activated first with <code>echo "1" > /proc/sys/kernel/sysrq</code>

+

These are low level shortcuts that are considered to be used for debugging. Whenever possible, it is recommended to use these instead of doing a hard shutdown (holding power button to shutdown the motherboard).

+

Must be activated first with {{ic|echo "1" > /proc/sys/kernel/sysrq}} or if you wish to have it enabled during boot, edit {{ic|/etc/sysctl.conf}} and set kernel.sysrq = 1

A common idiom to remember this is "'''R'''eboot '''E'''ven '''I'''f '''S'''ystem '''U'''tterly '''B'''roken" (also referred to as "REISUB").

A common idiom to remember this is "'''R'''eboot '''E'''ven '''I'''f '''S'''ystem '''U'''tterly '''B'''roken" (also referred to as "REISUB").

−

{|

{|

+

! Keyboard Shortcut

+

! Description

|-

|-

−

| {{keypress|Left Alt}}+{{keypress|SysRq}}+{{keypress|R}}+

+

| {{keypress|Alt}}+{{keypress|SysRq}}+{{keypress|R}}+ '''Unraw'''

−

| '''Unraw''' -- Take control of keyboard back from X

+

| Take control of keyboard back from X.

|-

|-

−

+

| {{keypress|Alt}}+{{keypress|SysRq}}+{{keypress|E}}+ '''Terminate'''

+

| Send SIGTERM to all processes, allowing them to terminate gracefully.

|-

|-

−

| {{keypress|Left Alt}}+{{keypress|SysRq}}+{{keypress|E}}+

+

| {{keypress|Alt}}+{{keypress|SysRq}}+{{keypress|I}}+ '''Kill'''

−

| '''Terminate''' -- Send SIGTERM to all processes, allowing them to terminate gracefully

+

| Send SIGKILL to all processes, forcing them to terminate immediately.

This example adds keys that allow (in ''vi-mode'') to search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search.

+

{{hc|.inputrc|

+

set editing-mode vi

+

set keymap vi-insert

+

"\C-r": history-search-backward

+

"\C-e": history-search-forward

+

}}

+

+

===X11===

+

====Modifying the Keyboard Layout====

+

This example changes the CapsLock key to only activate caps lock when the Shift key is also pressed

Users who prefer to work rather with the keyboard than the mouse may benefit from a key binding to the paste operation of the '''middle mouse button'''. This is especially useful in a keyboard-centered environment. A workflow example is:

+

#In Firefox, select a string you want to google for (with the mouse).

+

#Hit {{keypress|Ctrl+k}} to enter the "Google search" field.

+

#Hit {{keypress|F12}} to paste the buffer, instead of moving the mouse pointer to the field and center-click to paste.

+

+

The method suggested here uses three packages available in the [[Official Repositories|official repositories]]:

+

*{{Pkg|xsel}} to give access to the x-selection-buffer content.

+

*{{Pkg|xbindkeys}} to bind a key-stroke to an action.

+

*{{Pkg|xvkbd}} to pass the buffer string to the application by emulating keyboard input.

+

+

This example binds the x-selection-paste operation to the {{keypress|F12}} key:

+

{{hc|.xbindkeysrc|

+

"xvkbd -no-jump-pointer -xsendevent -text "\D1`xsel`" 2>/dev/null"

+

F12

+

}}

+

The {{ic|"\D1"}} code prefixes a 100 ms pause to inserting the selection buffer (see the [http://homepage3.nifty.com/tsato/xvkbd/ xvkbd home page]).

+

{{Note|Depending on your X configuration, you may need to drop the {{ic|-xsendevent}} argument to xvkbd.}}

+

The key codes for keys other than {{keypress|F12}} can be determined using {{ic|xbindkeys -k}}.

Standard Shortcuts

Kernel

These are low level shortcuts that are considered to be used for debugging. Whenever possible, it is recommended to use these instead of doing a hard shutdown (holding power button to shutdown the motherboard).

Must be activated first with echo "1" > /proc/sys/kernel/sysrq or if you wish to have it enabled during boot, edit /etc/sysctl.conf and set kernel.sysrq = 1

A common idiom to remember this is "Reboot Even If System Utterly Broken" (also referred to as "REISUB").

Readline

GNU readline is a commonly used library for line-editing,
it is used for example by bash, ftp and many more (see Arch Package details under "Required By" for more examples).
readline is also customizable (see manpage for details).

Links

User Customization

Readline

This example adds keys that allow (in vi-mode) to search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search.

X11

Modifying the Keyboard Layout

This example changes the CapsLock key to only activate caps lock when the Shift key is also pressed

.xinitrc

xmodmap -e 'keycode 66 = NoSymbol Caps_Lock Caps_Lock'

The keycode of the CapsLock key can be found in the output of
xmodmap -pk

Key Binding for X-Selection-Paste

Users who prefer to work rather with the keyboard than the mouse may benefit from a key binding to the paste operation of the middle mouse button. This is especially useful in a keyboard-centered environment. A workflow example is: