/usr/share/X11/xkb/symbols/pc でキーボード記号を編集します。 Firefoxはこれを無視します。

/usr/share/X11/xkb/symbols/pc でキーボード記号を編集します。 Firefoxはこれを無視します。

キーボードでオーディオを再生/一時停止したいのですが、残念ながら私のラップトップのキーボードにメディア/ファンクションキーがありません。これには不要な機能(トラックパッドの無効化など)がありますが、これらのファンクションキーは再マップできず、キーボードからオペレーティングシステムに直接移動することがわかりました。

したがって、XF86AudioPlayをエクスポートするにはAltGr+を選択します。Endそれに応じて修正します/usr/share/X11/xkb/symbols/pc

Ubuntuではビデオではうまく機能しますが、Firefoxでは機能しません。 (リズムボックスでもダメですが、とにかく音が聞こえません。)

キーストロークがプログラムにどのように伝播するかについての私の理解は完全に破壊されました。私はWindowsシステム(奇妙なことにキーボードシステムではありません)がアプリケーションにシンボルを提供すると思います。AltGr+をEndXF86AudioStopとして扱うようにWindowsシステムを設定しました。

しかし、Firefox(そしてすべてではありませんが、他のいくつかのプログラム)では、私は「終了」ボタンを押したと推測します。 ?

これらのウィンドウ/キーボードシステムの目的は、すべてのプログラムで同じシンボルを定義する必要がないということではありませんか?キーボードとプログラムの間の仲介者になりますか?そんなふうに行動しないようです!

➜  ~ xev -event keyboard
Outer window is 0x5000001, inner window is 0x5000002

KeymapNotify event, serial 24, synthetic NO, window 0x0,
    keys:  4294967234 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 25, synthetic NO, window 0x5000001,
    root 0x193, subw 0x0, time 56238457, (588,657), root:(738,872),
    state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x5000001,
    root 0x193, subw 0x0, time 56247439, (588,657), root:(738,872),
    state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x5000001,
    root 0x193, subw 0x0, time 56248610, (588,657), root:(738,872),
    state 0x90, keycode 115 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XKeysymToKeycode returns keycode: 172
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x5000001,
    root 0x193, subw 0x0, time 56248724, (588,657), root:(738,872),
    state 0x90, keycode 115 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XKeysymToKeycode returns keycode: 172
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x5000001,
    root 0x193, subw 0x0, time 56249265, (588,657), root:(738,872),
    state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

ClientMessage event, serial 28, synthetic YES, window 0x5000001,
    message_type 0x145 (WM_PROTOCOLS), format 32, message 0x143 (WM_DELETE_WINDOW)

ベストアンサー1

おすすめ記事