「キーボードショートカット」の版間の差分
(訳追加) |
|||
| 213行目: | 213行目: | ||
=== X-selection-paste のキーバインディング === |
=== 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). |
#In Firefox, select a string you want to google for (with the mouse). |
||
#Hit {{ic|Ctrl+k}} to enter the "Google search" field. |
#Hit {{ic|Ctrl+k}} to enter the "Google search" field. |
||
| 220行目: | 220行目: | ||
{{Note|{{ic|Shift+Insert}} has a similar yet different functionality, see [[#X11]]: {{ic|Shift+Insert}} inserts the clipboard buffer, not the x-selection-paste buffer. In some applications, these two buffers are mirrored.}} |
{{Note|{{ic|Shift+Insert}} has a similar yet different functionality, see [[#X11]]: {{ic|Shift+Insert}} inserts the clipboard buffer, not the x-selection-paste buffer. In some applications, these two buffers are mirrored.}} |
||
| + | ここでは[[公式リポジトリ]]にある3つのパッケージを使います: |
||
| − | The method suggested here uses three packages available in the [[official repositories]]: |
||
* {{Pkg|xsel}} to give access to the x-selection-buffer content. |
* {{Pkg|xsel}} to give access to the x-selection-buffer content. |
||
| 262行目: | 262行目: | ||
== Tips and tricks == |
== Tips and tricks == |
||
| + | * 主にキーボードを使って作業をする場合、[[ウィンドウマネージャ#タイル型ウィンドウマネージャ|タイル型ウィンドウマネージャ]]が気に入るかもしれません。 |
||
| − | * If you like a keyboard-centered workflow, you might also appreciate a [[Window manager#Tiling_window_managers|tiling window manager]]. |
||
== 参照 == |
== 参照 == |
||
2015年8月9日 (日) 16:34時点における版
この記事では (あまり有名でない) デフォルトのキーボードショートカットのリストとユーザーカスタマイズの情報を提供します。
目次
標準のショートカット
カーネル
カーネルにはローレベルなショートカットが複数実装されており、システムが反応しなくなったときに復旧させたりデバッグするのに用いることができます。いつでも使うことができますが、特に、電源ボタンを長押しして無理やりシステムの電源を切るよりかはショートカットを使うほうが推奨されます。
カーネルショートカットを使うには、最初に sysctl kernel.sysrq=1 または echo "1" > /proc/sys/kernel/sysrq でショートカットを有効にしておく必要があります。起動時に有効化されるようにするには、/etc/sysctl.d/99-sysctl.conf を編集して kernel.sysrq = 1 と設定してください。
覚え方は "Reboot Even If System Utterly Broken" です ("REISUB" とも呼ばれます)。もしくは "BUSIER" の反対として覚えましょう。
| キーボードショートカット | 説明 |
|---|---|
Alt+SysRq+r Unraw
|
キーボードの制御を X から取り戻す。 |
Alt+SysRq+e Terminate
|
全てのプロセスに SIGTERM を送り、丁寧にプロセスを終了させる。 |
Alt+SysRq+i Kill
|
全てのプロセスに SIGKILL を送り、即座にプロセスを強制終了させる。 |
Alt+SysRq+s Sync
|
データをディスクに書き込む。 |
Alt+SysRq+u Unmount
|
全てのファイルシステムをアンマウントして読み取り専用で再マウント。 |
Alt+SysRq+b Reboot
|
再起動 |
詳しくは Wikipedia のマジック SysRq キーを見て下さい。
ターミナル
仮想端末
| キーボードショートカット | 説明 |
|---|---|
Ctrl+Alt+Del
|
コンピュータを再起動 (specified by the symlink /usr/lib/systemd/system/ctrl-alt-del.target)
|
Alt+F1, F2, F3, ...
|
n 番目の仮想端末にスイッチ |
Alt+ ←
|
前の仮想端末にスイッチ |
Alt+ →
|
次の仮想端末にスイッチ |
Scroll Lock
|
Scroll Lock が有効になっているとき、入出力がロックされます |
Shift+PgUp/PgDown
|
コンソールバッファを上下にスクロール |
Ctrl+c
|
現在のタスクを終了 |
Ctrl+d
|
EOF を挿入 |
Ctrl+z
|
現在のタスクを停止 |
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 man page for details).
| キーボードショートカット | 説明 |
|---|---|
Ctrl+l
|
画面をクリア |
| カーソルの移動 | |
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 |
| コピー & ペースト | |
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+./_
|
Paste the last argument of the previous command |
| 履歴 | |
Ctrl+p
|
Move to the previous line |
Alt+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 |
| 補完 | |
Tab
|
Auto-complete a name |
Alt+?
|
List all possible completions |
Alt+*
|
Insert all possible completions |
X11
| キーボードショートカット | 説明 |
|---|---|
Ctrl+Alt+F1, F2, F3, ...
|
n 番目の仮想端末にスイッチ |
Shift+Insert Mouse Button 2
|
選択されたテキストをクリップボードにコピー、もしくはクリップボードから貼り付け |
ユーザーカスタマイズ
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.
.inputrc
set editing-mode vi set keymap vi-insert "\C-r": history-search-backward "\C-e": history-search-forward
X11
一般的なショートカットや、デフォルトで無効になっているショートカットは Xorg でのキーボード設定#よく使われる XKB オプションを見て下さい。
Firefox
customizable-shortcuts アドオンを使ってください。
X-selection-paste のキーバインディング
マウスよりもキーボードを好んで使用する場合、マウスの中ボタンでペーストを行うキーバインドが役に立つかもしれません。特にキーボードを集中的に使う環境では有用です。ワークフローを以下のようになります:
- In Firefox, select a string you want to google for (with the mouse).
- Hit
Ctrl+kto enter the "Google search" field. - Hit
F12to paste the buffer, instead of moving the mouse pointer to the field and center-click to paste.
ここでは公式リポジトリにある3つのパッケージを使います:
- xsel to give access to the x-selection-buffer content.
- Xbindkeys to bind a key-stroke to an action.
- xvkbd to pass the buffer string to the application by emulating keyboard input.
This example binds the x-selection-paste operation to the F12 key:
.xbindkeysrc
"xvkbd -no-jump-pointer -xsendevent -text "\D1`xsel`" 2>/dev/null"
F12
The "\D1" code prefixes a 100 ms pause to inserting the selection buffer (see the xvkbd home page).
The key codes for keys other than F12 can be determined using xbindkeys -k.
References:
XMonad Window Manager
In the xmonad window manager there is a built-in function to paste the x-selection-buffer content. In order to bind that function to a key-stroke (here Insert key) the following configuration can be used:
xmonad.hs
import XMonad.Util.Paste ... -- X-selection-paste buffer , ((0, xK_Insert), pasteSelection) ]
Using xdotool - command-line X11 automation tool
With the xdotool it is possible to create a short cut which actually paste the content of the X-Selection buffer via triggering the middle mouse button. Instead of hit the text as separate key strokes. The command for the short cut is:
xdotool getwindowfocus key --window %1 click 2
The command get the window which has focus from the xserver and triggers a click of button 2 which is the middle mouse button.
Tips and tricks
- 主にキーボードを使って作業をする場合、タイル型ウィンドウマネージャが気に入るかもしれません。