Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
キーボードショートカットのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
キーボードショートカット
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:キーボード設定]] [[Category:X サーバー]] [[Category:アクセシビリティ]] [[en:Keyboard shortcuts]] [[zh-hans:Keyboard shortcuts]] この記事では (あまり有名でない) デフォルトのキーボードショートカットのリストとユーザーカスタマイズの情報を提供します。 == 標準のショートカット == === カーネル (SysRq) === sysrq キーを介してカーネルに実装されるローレベルなショートカットがいくつかあります。これらのショートカットは、システムが反応しなくなったときに復旧させたりデバッグするのに用いることができます。いつでも使うことができますが、特に、電源ボタンを長押しして無理やりシステムの電源を切るよりかはショートカットを使うほうが推奨されます。 詳細については、[[Wikipedia:Magic SysRq key]] を参照してください。 ==== 有効化 ==== [[systemd]] は sysrq パーミッションのビットマスクがを[https://github.com/systemd/systemd/blob/main/sysctl.d/50-default.conf#L14-L19 デフォルトで 0X10に設定]しており、特に[https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html プロセスのシグナリングや再起動などを許可していません]。システムで sysrq キーを完全に使用できるようにするには [[sysctl#設定|sysctl の設定]]に、{{ic|1=kernel.sysrq = 1}} を追加してください。1 より大きい値は、sysrq 機能を選択的に有効にするために使用できます。詳細は、[https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html Linuxカーネルのドキュメント]を参照してください。パーティションがマウントされる前やinitrd内でも有効にしたい場合は、{{ic|1=sysrq_always_enabled=1}} を[[カーネルパラメータ]]に追加してください。 Note that changing the setting through these methods will cause the changes to persist across reboots. If you want to try changing the sysrq settings for just your current session, you can run either {{ic|1=sysctl kernel.sysrq=1}} or {{ic|echo "1" > /proc/sys/kernel/sysrq}}. There are some obvious security risks involved in fully enabling the sysrq key. In addition to forcing reboots and the like, it can be used to dump the contents of the CPU registers, which could theoretically reveal sensitive information. Since using it requires physical access to the system (unless you [https://github.com/jd/sysrqd go out of your way]), most desktop users will probably consider the level of risk acceptable. That said, make sure you fully understand the implications of enabling it and the dynamics of the larger context in which your system is operating before you turn sysrq all the way on. ==== 再起動 ==== 覚え方は "'''R'''eboot '''E'''ven '''I'''f '''S'''ystem '''U'''tterly '''B'''roken" です ("REISUB" とも呼ばれます)。もしくは "BUSIER" の反対として覚えましょう。 {{Note|Please be aware that "REISUB" itself is just a mnemonic, not any kind of general recommendation for the key press sequence to take back control of an unresponsive system. You should not blindly press these sequences each time without knowing their actual function as noted below.}} {| class="wikitable" ! キーボードショートカット ! 説明 ! Code to Enable ! Other Functions Enabled |- | {{ic|Alt+SysRq+r}} Unraw | キーボードの制御を X から取り戻す。 | style="text-align:center;" | 4 | {{ic|Alt+SysRq+k}} SAK |- | {{ic|Alt+SysRq+e}} Terminate | 全てのプロセスに SIGTERM を送り、丁寧にプロセスを終了させる。 | rowspan=2 style="text-align:center;" | 64 | rowspan=2 | {{ic|Alt+SysRq+f}} OOM kill <br /> {{ic|Alt+SysRq+j}} Thaw |- | {{ic|Alt+SysRq+i}} Kill | 全てのプロセスに SIGKILL を送り、即座にプロセスを強制終了させる。 |- | {{ic|Alt+SysRq+s}} Sync | データをディスクに書き込む。 | style="text-align:center;" | 16 | style="text-align:center;" | - |- | {{ic|Alt+SysRq+u}} Unmount | 全てのファイルシステムをアンマウントして読み取り専用で再マウント。 | style="text-align:center;" | 32 | style="text-align:center;" | - |- | {{ic|Alt+SysRq+b}} Reboot | 再起動 | style="text-align:center;" | 128 | style="text-align:center;" | - |- |} For example, to selectively enable just the reboot function, set {{ic|1=kernel.sysrq}} to 128. The whole set of REISUB functions can be enabled by setting it to 244, although this also enables the additional functions listed in the last column of the table. For further documentation, see the [https://kernel.org/doc/html/latest/admin-guide/sysrq.html sysrq key documentation], and the kernel source file {{ic|/drivers/tty/sysrq.c}}. ==== Killing a memory-hogging process ==== {{ic|Alt+SysRq+f}} can be used to invoke the [https://www.kernel.org/doc/html/latest/admin-guide/mm/concepts.html?highlight=oom#oom-killer OOM (out-of-memory) killer] without causing a kernel panic if nothing can be killed. The OOM killer uses a set of heuristics to pick whichever relatively non-vital process is using the most memory and kill it. This is very useful to kill a process that is softlocking your system by causing excessive thrashing, such as a runaway browser script, and can alleviate the need for a reboot in many cases. Note that the OOM killer can target a wide variety of processes despite its well-meaning heuristics and can be somewhat unpredictable, so be careful about calling it casually. ==== Troubleshooting ==== * If you are using a [[ディスプレイマネージャ]] and after {{ic|Alt+SysRq+e}} you are presented with the login screen (or full desktop if autologin is enabled), it is most likely caused by {{ic|1=Restart=always}} directive in the relevant [[systemd|サービスファイル]]. If necessary, [[ユニットファイルの編集]], however this should not prevent the "REISUB" sequence from working. * If all the above combinations work except {{ic|Alt+SysRq+b}}, try using the contralateral {{ic|Alt}} key. * On laptops that use {{ic|Fn}} key to differentiate {{ic|SysRq}} from {{ic|PrtScrn}}, it may not actually be necessary to use the {{ic|Fn}} key (i.e., {{ic|Alt+PrtSc+''letter''}} could work). * On Lenovo laptops {{ic|SysRq}} is often configured as {{ic|Fn+S}}. To use it press and hold {{ic|Alt}} then press {{ic|Fn+s}}, '''release''' {{ic|Fn}} and {{ic|s}} still holding {{ic|Alt}} followed by the keys above. * You may need to press {{ic|Ctrl}} along with {{ic|Alt}}. So for example, full key shortcut would be {{ic|Ctrl+Alt+SysRq+b}}. === Linux console === See [[Linux コンソール#キーボードショートカット]]. === X11 & Wayland === {| class="wikitable" ! キーボードショートカット ! 説明 ! ノート |- | {{ic|Ctrl+Alt+F1}}, {{ic|F2}}, {{ic|F3}}, ... | ''n'' 番目の仮想端末にスイッチ | 機能しない場合 {{ic|Ctrl+Fn+Alt+F…}} を試してみてください。 |- | {{ic|Shift+Insert}} <br> {{ic|Mouse Button 2}} | [[クリップボード|PRIMARY バッファ]]からテキストを貼り付ける | デフォルトでは [[Qt]] は {{ic|Shift+Insert}} で PRIMARY バッファではなく CLIPBOARD を使います [https://doc.qt.io/qt-5/qlineedit.html#details]。そして PRIMARY バッファは {{ic|Ctrl+Shift+Insert}} を使用します。 |- |} == カスタマイズ == === Readline === [[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). It has [[Emacs]]-like and [[vi]]-like editing modes which can be customized with escape sequences. Default key bindings are listed in {{man|3|readline}} and the [https://tiswww.cwru.edu/php/chet/readline/rluserman.html Info documentation]. === Zsh === [[Zsh]] は [[Zsh#Key_bindings|ZLE]] を使用して、ショートカットをウィジット、スクリプトおよびコマンドにリンクします。 === Xorg === See [[Xorg でのキーボード設定#よく使われる XKB オプション]] for some common shortcuts, that are disabled by default. When we are in a graphical environment we may want to execute a command when certain key combination is pressed (i.e. bind a command to a ''keysym''). There are multiple ways to do that: * The most portable way using low level tools, such as [[acpid]]. Not all keys are supported, but configuration in uniform way is possible for keyboard keys, power adapter connection and even headphone jack (un)plugging events. It is also difficult to run programs inside X session correctly. * The universal way using [[Xorg]] utilities (e.g. [[xbindkeys]]) and eventually your desktop environment or window manager tools. * The quicker way using a third-party program to do everything in GUI, such as the Gnome Control Center. ==== sxhkd ==== A simple X hotkey daemon with a powerful and compact configuration syntax. See [[sxhkd]] for details. ==== actkbd ==== From [http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/ actkbd home page]: :{{AUR|actkbd}} (available in [[AUR]]) is a simple daemon that binds actions to keyboard events. It recognises key combinations and can handle press, repeat and release events. Currently it only supports the linux-2.6 evdev interface. It uses a plain-text configuration file which contains all the bindings. A sample configuration and guide is available [http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/latest/README here]. ==== xbindkeys ==== [[xbindkeys]] allows advanced mapping of keysyms to actions independently of the Desktop Environment. {{Tip| If you find {{ic|xbindkeys}} difficult to use, try the graphical manager {{AUR|xbindkeys_config-gtk2}} from the [[AUR]].}} === Desktop environments === * [[LXDE#Bindings]] * [[Xfce#Keyboard Shortcuts]] === Window managers === * [[Fluxbox#Hotkeys]] * [[Openbox#Keybinds]] === X-selection-paste のキーバインディング === マウスよりもキーボードを好んで使用する場合、''マウスの中ボタン''でペーストを行うキーバインドが役に立つかもしれません。特にキーボードを集中的に使う環境では有用です。ワークフローは以下のようになります: #Firefox で、検索したい文字列を (マウスで) 選択してください。 #{{ic|Ctrl+k}} を押して "Google search" フィールドにカーソルを移動。 #マウスポインタを移動して中ボタンを押す代わりに {{ic|F12}} でバッファを貼り付け。 {{Note|{{ic|Shift+Insert}} で同じような機能が実行できます。[[#X11]] を見てください: {{ic|Shift+Insert}} は x-selection-paste バッファではなくクリップボードバッファを挿入します。アプリケーションによっては、両方のバッファには同じ中身が入ります。}} ここでは[[公式リポジトリ]]にある3つのパッケージを使います: * {{Pkg|xsel}} で x-selection-buffer の中身にアクセス。 * [[Xbindkeys]] でキーストロークに操作をバインド。 * {{AUR|xvkbd}} でキーボードの入力をエミュレートしてバッファ文字列をアプリケーションに渡す。 以下の例では x-selection-paste の操作を {{ic|F12}} キーにバインドします: {{hc|.xbindkeysrc| "xvkbd -no-jump-pointer -xsendevent -text "\D1`xsel`" 2>/dev/null" F12 }} {{ic|"\D1"}} コードはセレクションバッファの挿入の前に 100 ms のポーズを追加します ([http://t-sato.in.coocan.jp/xvkbd/ xvkbd のホームページ] を参照)。 {{Note|X の設定によっては、xvkbd の {{ic|-xsendevent}} 引数を外す必要があります。}} {{ic|F12}} 以外のキーのキーコードは {{ic|xbindkeys -k}} で確認できます。 '''参照:''' * [https://unix.stackexchange.com/questions/11889/pasting-x-selection-not-clipboard-contents-with-keyboard Pasting X selection (not clipboard) contents with keyboard] * [http://t-sato.in.coocan.jp/xvkbd/ xvkbd ホームページ] ==== XMonad ウィンドウマネージャ ==== [[xmonad]] ウィンドウマネージャには x-selection-buffer の中身を貼り付ける機能が内蔵されています。特定のキーストローク (例: {{ic|Insert}} キー) にバインドするには以下の設定を使用: {{hc|xmonad.hs| import XMonad.Util.Paste ... -- X-selection-paste buffer , ((0, xK_Insert), pasteSelection) ] }} == ヒントとテクニック == * 主にキーボードを使って作業をする場合、[[ウィンドウマネージャ#タイル型ウィンドウマネージャ|タイル型ウィンドウマネージャ]]が気に入るかもしれません。 == 参照 == * [http://lnag.sourceforge.net/lnag_html/node5.html Linux Newbie Administrator Guide - Shortcuts and Commands] * [https://tldp.org/HOWTO/Keyboard-and-Console-HOWTO.html The Linux keyboard and console HOWTO]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
キーボードショートカット
に戻る。
検索
検索
キーボードショートカットのソースを表示
話題を追加