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).

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

+

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.d/99-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").

Line 18:

Line 18:

! Description

! Description

|-

|-

−

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

+

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

| Take control of keyboard back from X.

| Take control of keyboard back from X.

|-

|-

−

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

+

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

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

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

|-

|-

−

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

+

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

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

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

GNU readline is a commonly used library for line-editing, it is used for example by bash, ftp and many more (see the details of {{Pkg|readline}} package under "Required By" for more examples). readline is also customizable (see manpage for details).

−

it is used for example by bash, ftp and many more (see [http://archlinux.org/packages/core/i686/readline/ Arch Package details] under "Required By" for more examples).

See [[Keyboard Configuration in Xorg#Frequently used XKB options]] for some common shortcuts, that are disabled by default.

+

+

See [[xmodmap]] for more extensive keyboard layout modifications.

+

+

====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:

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).

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

−

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

+

#Hit {{ic|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.

+

#Hit {{ic|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]]:

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

Line 235:

Line 223:

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

*{{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:

+

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

{{hc|.xbindkeysrc|

{{hc|.xbindkeysrc|

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

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

Line 242:

Line 230:

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]).

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.}}

{{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}}.

+

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

'''See Also:'''

'''See Also:'''

Line 252:

Line 240:

==Tips==

==Tips==

−

*If you like a keyboard-centered workflow, you might also appreciate a [http://en.wikipedia.org/wiki/Tiling_window_manager tiling window manager], like [[Xmonad]].

+

*If you like a keyboard-centered workflow, you might also appreciate a [[wikipedia:Tiling_window_manager|tiling window manager]], like [[Xmonad]].

Contents

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.d/99-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 the details of readline package under "Required By" for more examples). readline is also customizable (see manpage for details).

Keyboard Shortcut

Description

Ctrl+L

Clear the screen

Cursor Movement

Ctrl+B

Move cursor one character to the left

Ctrl+F

Move cursor one character to the right

Alt+B

Move cursor one word to the left

Alt+F

Move cursor one word to the right

Ctrl+A

Move cursor to start of the line

Ctrl+E

Move cursor to end of the line

Copy & Paste

Ctrl+U

Cut everything from line start to cursor

Ctrl+K

Cut everything from the cursor to end of the line

Alt+D

Cut the current word after the cursor

Ctrl+W

Cut the current word before the cursor

Ctrl+Y

Paste the previous cut text

Alt+Y

Paste the second latest cut text

Alt+Ctrl+Y

Paste the first argument of the previous command

Alt+.or_

Paste the last argument of the previous command

History

Ctrl+P

Move to the previous line

Altl+N

Move to the next line

Ctrl+S

Search

Ctrl+R

Reverse search

Ctrl+J

End search

Ctrl+G

Abort search (restores original line)

Alt+R

Restores all changes made to line

Completion

Tab

Auto-complete a name

Altl+?

List all possible completions

Alt+*

Insert all possible completions

X11

Keyboard Shortcut

Description

Ctrl+Alt+F1, F2, F3, ...

Switch to n-th virtual console

Ctrl+Alt++/-

Switch to higher/lower available resolutions

Ctrl+⇑ Shift+Num Lock

Toggles keyboard mouse; uses numpad, mouse click is done by 5, use /, *, and -to switch the click to left, middle, and right click

Shift+InsertMouse Button 3

Copy selected text to clipboard, or paste from clipboard

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

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:

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

Hit Ctrl+k to enter the "Google search" field.

Hit F12 to paste the buffer, instead of moving the mouse pointer to the field and center-click to paste.