Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
特別なキーボードキーのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
特別なキーボードキー
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:キーボード]] [[en:Extra keyboard keys]] [[ru:Extra keyboard keys]] [[zh-CN:Extra Keyboard Keys]] {{Related articles start}} {{Related|Xorg での特別なキーボードキー}} {{Related|コンソールでの特別なキーボードキー}} {{Related|Xorg でのキーボード設定}} {{Related|コンソールでのキーボード設定}} {{Related3|Map scancodes to keycodes|スキャンコードをキーコードにマップ}} {{Related|Xmodmap}} {{Related articles end}} 多くのキーボードには何らかの''特別なキー''が付いており (''ホットキー''や''マルチメディアキー''とも呼ばれる)、アプリケーションを起動したり特殊な文字を打ち込むのに使われます (標準的なキーマップには含まれていない機能)。[[udev]] は様々なキーボードに関する巨大なデータベースを持っているため、基本的なキーボードは何も設定せずとも問題なく動作します。最近発売されたばかり、または非常にレアなハードウェアを使っている場合に、マッピングを手動で調整する必要がでてきます。 キーマッピングを変更する前に、そのキーがシステムでどう認識されているのか知らなくてはなりません。いくつかの段階に分かれています: * [[Wikipedia:ja:スキャンコード|スキャンコード]]は最下層のキー識別番号で、キーボードがコンピュータに送信する値になります。 * '''キーコード'''は2番目のキー識別子で、''キーコード''は機能に対応しています。 * '''キーシム'''は3番目のキー識別子で、''シンボル''に対応しています。キーシムは Shift キーなどの[[Wikipedia:ja:修飾キー|修飾キー]]が押されているかどうかによって変わります。 ''スキャンコード''は''キーコード''にマップされており、''キーコード''は使用しているキーボードレイアウトにあわせて''キーシム''にマップされています。ほとんどのキーには''キーコード''が割り当てられているはずです。そして、''キーコード''がなくとも''スキャンコード''は存在するでしょう。''スキャンコード''が存在しないキーはカーネルによって認識されていません。ゲーミングキーボードに追加されているキーなどで''スキャンコード''がないことがあります。 Xorg では、特定の''キーシム'' (例: {{ic|XF86AudioPlay}}, {{ic|XF86AudioRaiseVolume}} など) をアクションにマップすることができます (例: アプリケーションの起動)。詳しくは [[Xorg での特別なキーボードキー#キーシムをアクションにマップ]] を見て下さい。 Linux コンソールでは、特定の''キーシム'' (例: {{ic|F1}} から {{ic|F246}}) を特定のアクションにマップすることができます (例: 他のコンソールへの切り替えや特定の文字列の打ち込みなど)。詳しくは[[コンソールでの特別なキーボードキー]]を見て下さい。 == キーコードの確認 == === スキャンコード === ==== showkey を使う ==== ''スキャンコード''を取得するときは ''showkey'' ユーティリティを使うのが一般的です。''showkey'' はキーが押されるまで待機し、10秒たってもキーが押されなかった場合、終了します。''showkey'' を使用するには[[Wikipedia:ja:仮想コンソール|仮想端末]]上で実行させる必要があり、グラフィカル環境やネットワーク接続を介してログインした場合は使用できません。次のコマンドを実行してください: # showkey --scancodes コマンドを実行した後にキーボードのキーを押してみて下さい。''スキャンコード''が出力されます。 ==== dmesg を使う ==== {{Note|This method does not provide ''scancodes'' for all keys, it only identifies the unknown keys.}} You can get the ''scancode'' of a key by pressing the desired key and looking the output of {{ic|dmesg}} command. For example, if you get: Unknown key pressed (translated set 2, code 0xa0 on isa0060/serio0 then the ''scancode'' you need is {{ic|0xa0}}. === キーコード === {{Warning|Note that the ''keycodes'' are different for Linux console and Xorg. Use the appropriate tool to determine the desired value.}} ==== コンソール ==== The ''keycodes'' for [[Wikipedia:Virtual console|virtual console]] are reported by the ''showkey'' utility. ''showkey'' waits for a key to be pressed and if none is during 10 seconds it quits, which is the only way to exit the program. To execute ''showkey'' you need to be in a virtual console, not in a graphical environment. Run the following command # showkey --keycodes and try to push keyboard keys, you should see ''keycodes'' being printed to the output. ==== Xorg ==== [[Xorg]] によって使用される''キーコード''は ''xev'' という名前のユーティリティで判別できます ({{Pkg|xorg-xev}} パッケージに入っています)。もちろん ''xev'' を使用するには、コンソールではなくグラフィカル環境から実行する必要があります。 次のコマンドで ''xev'' を起動して肝心の部分だけを表示できます: $ xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p' 出力例: 38 a 27 r 54 c 43 h 153 NoSymbol 144 NoSymbol In the example the keys {{ic|a}}, {{ic|r}}, {{ic|c}}, {{ic|h}} and two other multimedia keys were pressed. The former four keys with ''keycodes'' {{ic|38}}, {{ic|27}}, {{ic|54}} and {{ic|43}} are properly mapped, while the multimedia keys with ''keycodes'' {{ic|153}} and {{ic|144}} are not. The {{ic|NoSymbol}} indicates that no ''keysyms'' are assigned to those keys. If you press a key and nothing appears in the terminal, it means that either the key does not have a ''scancode'', the ''scancode'' is not mapped to a ''keycode'', or some other process is capturing the keypress. If you suspect that a process listening to X server is capturing the keypress, you can try running xev from a clean X session: $ xinit /usr/bin/xterm -- :1 == スキャンコードをキーコードにマッピング == 次の記事を参照してください: [[スキャンコードをキーコードにマップ]]。 == キーコードをキーシムにマッピング == === コンソール === 次の記事を参照してください: [[コンソールでの特別なキーボードキー]]。 === Xorg === 次の記事を参照してください: [[xmodmap]]。 == ノートパソコン == === Asus M シリーズ === In order to have control over the light sensor and the multimedia keys on your Asus machine, you should use the following command: # echo 1 > /sys/devices/platform/asus_laptop/ls_switch To have it run on boot create a [[Systemd#Temporary_files|Systemd tmpfile]]: {{hc|/etc/tmpfiles.d/local.conf| w /sys/devices/platform/asus_laptop/ls_switch - - - - 1 }} {{Note|This may work also for other Asus notebook models.}} === Asus N56VJ === if most of your special keys don't work, try loading the asus-nb-wmi kernel module with # modprobe asus-nb-wmi then check xev again. if you combine this with the acpi_osi="!Windows 2012" boot option, you may get weird results in xev, so try not using it. If this did fix things, make sure to make the module load at boot with methods described [[Kernel modules|here]] == 参照 == * [http://keytouch.sourceforge.net/howto_keyboard/node4.html How to retrieve scancodes] by Marvin Raaijmakers * [http://wiki.linuxquestions.org/wiki/Configuring_keyboards#Enabling_Keyboard_Multimedia_Keys Enabling Keyboard Multimedia Keys] - guide on LinuxQuestions wiki * [http://www.gentoo-wiki.info/HOWTO_Use_Multimedia_Keys Multimedia Keys] on [http://www.gentoo-wiki.info/ Gentoo Wiki Archives]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Aur
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
特別なキーボードキー
に戻る。
検索
検索
特別なキーボードキーのソースを表示
話題を追加