XがALT_LとALT_RをMod1とは別に扱わない理由

XがALT_LとALT_RをMod1とは別に扱わない理由

Mod1xmodmap含めないようにviaの定義を変更しましたALT_R(なぜ下にスクロールするのかを理解するため)。現在の修飾子のレイアウトは次のとおりです。ALT_R定義には関係ありませんが、生成されたmod1レコードによると、xevAltキーを押すと(8 inで定義されている)KeyEvent.stateに設定されます。mod1Mask/usr/include/X11/X.h

「いいえ」xmodmaskと言われているなら、報告書に+なぜそう見えるのでしょうか?ALT_Rmod1XALT_Rf

xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

次の順序はALT_L+fALT_R+ですf

KeyPress event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4126632, (85,488), root:(86,489),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4126850, (85,488), root:(86,489),
    state 0x8, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XmbLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4126930, (85,488), root:(86,489),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4126969, (85,488), root:(86,489),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4127907, (85,488), root:(86,489),
    state 0x0, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4128123, (85,488), root:(86,489),
    state 0x8, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XmbLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4128164, (85,488), root:(86,489),
    state 0x8, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1000001,
    root 0xc0, subw 0x0, time 4128203, (85,488), root:(86,489),
    state 0x0, keycode 41 (keysym 0x66, f), same_screen YES,
    XLookupString gives 1 bytes: (66) "f"
    XFilterEvent returns: False

背景:

ALT_RENTER+を使用して機能を実行するアプリケーションがあります。 Xmonadでこのアプリケーションを使用すると、Mod1+の組み合わせはENTER「現在のウィンドウをメインウィンドウに置き換える」機能をトリガーします。デフォルトでALT_LおよびALT_RにマップされますMod1

私はXmonadを起動する前に定義の一部ではない.xinitrcキーマップを変更しました。それにもかかわらず、Xmonadは+が入力されたときにウィンドウ交換動作を実行します。 Xmonadはそれがもう含まれていないことを知らないようです。xmodmapALT_RMod1ALT_RENTERMod1ALT_R

これは私のものです。.xinitrc

# Java's GUI can't handle some non-reparenting window managers like
# Xmonad without being told how to behave
export _JAVA_AWT_WM_NONREPARENTING=1

# The right Alt key is useful in IntelliJ, tell Xmonad to ignore it
xmodmap ~/.Xmodmap

# Start Xmonad
xmonad

xmodmap上記でXmonadを起動した後の出力です。

シーケンスを記録し、xevそのENTERシーケンスが登録されていないことを確認しました。代わりに、録画後に複数のイベントFocusInFocusOut発生します。ALT_R

KeyPress event, serial 32, synthetic NO, window 0x1200001,
    root 0xc0, subw 0x0, time 1432589, (92,374), root:(93,375),
    state 0x0, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 32, synthetic NO, window 0x1200001,
    mode NotifyGrab, detail NotifyAncestor

PropertyNotify event, serial 32, synthetic NO, window 0x1200001,
    atom 0x155 (WM_STATE), time 1433760, state PropertyNewValue

FocusOut event, serial 32, synthetic NO, window 0x1200001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 32, synthetic NO, window 0x1200001,
    mode NotifyUngrab, detail NotifyAncestor

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

KeyRelease event, serial 32, synthetic NO, window 0x1200001,
    root 0xc0, subw 0x0, time 1434117, (92,374), root:(93,375),
    state 0x8, keycode 108 (keysym 0xffea, Alt_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

ベストアンサー1

Alt_Rが他の修飾子に割り当てられていない場合、デフォルトはMod1Maskのようです。

0x20で正しいaltをバインド解除するだけです。

ソリューションよりも回避策に近いが。

おすすめ記事