일부 키 입력은 KeyRelease 이벤트만 보냅니다.

일부 키 입력은 KeyRelease 이벤트만 보냅니다.

어떤 이유로 일부 키 입력은 KeyRelease 이벤트만 보내고 KeyPress 이벤트는 보내지 않습니다.

"Print Screen"을 누르면 나타나는 내용입니다. 이렇게 하면 Print Screen 키가 이벤트 KeyPress와 이벤트를 모두 보내는 키로 다시 매핑되는 것을 방지할 수 있습니다 KeyRelease.

[user@Laptop ~]$ xmodmap -e "keycode 107 = Delete"
[user@Laptop ~]$ sleep 1 && xev
Outer window is 0x5400001, inner window is 0x5400002

PropertyNotify event, serial 8, synthetic NO, window 0x5400001,
    atom 0x27 (WM_NAME), time 15113402, state PropertyNewValue

PropertyNotify event, serial 9, synthetic NO, window 0x5400001,
    atom 0x22 (WM_COMMAND), time 15113402, state PropertyNewValue

PropertyNotify event, serial 10, synthetic NO, window 0x5400001,
    atom 0x28 (WM_NORMAL_HINTS), time 15113402, state PropertyNewValue

CreateNotify event, serial 11, synthetic NO, window 0x5400001,
    parent 0x5400001, window 0x5400002, (10,10), width 50, height 50
border_width 4, override NO

PropertyNotify event, serial 13, synthetic NO, window 0x5400001,
    atom 0x209 (_KDE_NET_WM_USER_CREATION_TIME), time 15113404, state PropertyNewValue

PropertyNotify event, serial 14, synthetic NO, window 0x5400001,
    atom 0x13a (WM_PROTOCOLS), time 15113404, state PropertyNewValue

MapNotify event, serial 15, synthetic NO, window 0x5400001,
    event 0x5400001, window 0x5400002, override NO

ConfigureNotify event, serial 26, synthetic NO, window 0x5400001,
    event 0x5400001, window 0x5400001, (0,0), width 178, height 178,
    border_width 0, above 0x5c00018, override NO

ReparentNotify event, serial 26, synthetic NO, window 0x5400001,
    event 0x5400001, window 0x5400001, parent 0x363ae5b,
    (0,0), override NO

PropertyNotify event, serial 29, synthetic NO, window 0x5400001,
    atom 0x148 (_NET_WM_STATE), time 15113406, state PropertyNewValue

MapNotify event, serial 29, synthetic NO, window 0x5400001,
    event 0x5400001, window 0x5400001, override NO

VisibilityNotify event, serial 29, synthetic NO, window 0x5400001,
    state VisibilityPartiallyObscured

Expose event, serial 29, synthetic NO, window 0x5400001,
    (0,0), width 1, height 1, count 0

PropertyNotify event, serial 29, synthetic NO, window 0x5400001,
    atom 0x169 (WM_STATE), time 15113407, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x5400001,
    atom 0x1fa (_KDE_NET_WM_ACTIVITIES), time 15113407, state PropertyNewValue

PropertyNotify event, serial 32, synthetic NO, window 0x5400001,
    atom 0x148 (_NET_WM_STATE), time 15113454, state PropertyNewValue

PropertyNotify event, serial 32, synthetic NO, window 0x5400001,
    atom 0x142 (_NET_WM_DESKTOP), time 15113454, state PropertyNewValue

PropertyNotify event, serial 32, synthetic NO, window 0x5400001,
    atom 0x148 (_NET_WM_STATE), time 15113454, state PropertyNewValue

PropertyNotify event, serial 32, synthetic NO, window 0x5400001,
    atom 0x142 (_NET_WM_DESKTOP), time 15113454, state PropertyNewValue

PropertyNotify event, serial 33, synthetic NO, window 0x5400001,
    atom 0x13f (_NET_FRAME_EXTENTS), time 15113458, state PropertyNewValue

PropertyNotify event, serial 33, synthetic NO, window 0x5400001,
    atom 0x1a8 (_KDE_NET_WM_FRAME_STRUT), time 15113458, state PropertyNewValue

PropertyNotify event, serial 33, synthetic NO, window 0x5400001,
    atom 0x1e6 (_NET_WM_ALLOWED_ACTIONS), time 15113458, state PropertyNewValue

PropertyNotify event, serial 36, synthetic NO, window 0x5400001,
    atom 0x148 (_NET_WM_STATE), time 15113459, state PropertyNewValue

FocusIn event, serial 36, synthetic NO, window 0x5400001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 36, synthetic NO, window 0x0,
    keys:  4294967208 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   0   0   0   0   

VisibilityNotify event, serial 36, synthetic NO, window 0x5400001,
    state VisibilityUnobscured

Expose event, serial 36, synthetic NO, window 0x5400001,
    (1,0), width 177, height 1, count 4

Expose event, serial 36, synthetic NO, window 0x5400001,
    (0,1), width 178, height 9, count 3

Expose event, serial 36, synthetic NO, window 0x5400001,
    (0,10), width 10, height 58, count 2

Expose event, serial 36, synthetic NO, window 0x5400001,
    (68,10), width 110, height 58, count 1

Expose event, serial 36, synthetic NO, window 0x5400001,
    (0,68), width 178, height 110, count 0

ConfigureNotify event, serial 36, synthetic YES, window 0x5400001,
    event 0x5400001, window 0x5400001, (0,31), width 178, height 178,
    border_width 0, above 0x0, override NO

PropertyNotify event, serial 36, synthetic NO, window 0x5400001,
    atom 0x1fa (_KDE_NET_WM_ACTIVITIES), time 15113459, state PropertyNewValue

PropertyNotify event, serial 36, synthetic NO, window 0x5400001,
    atom 0x148 (_NET_WM_STATE), time 15113459, state PropertyNewValue

PropertyNotify event, serial 36, synthetic NO, window 0x5400001,
    atom 0x1e4 (_NET_WM_ICON_GEOMETRY), time 15113743, state PropertyNewValue

FocusOut event, serial 37, synthetic NO, window 0x5400001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x5400001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  4294967290 0   0   0   0   0   0   0   0   0   0   0   0   8   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 37, synthetic NO, window 0x5400001,
    root 0xdf, subw 0x0, time 15117991, (953,482), root:(953,513),
    state 0x0, keycode 107 (keysym 0xffff, Delete), same_screen YES,
    XLookupString gives 1 bytes: (7f) ""
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x5400001,
    root 0xdf, subw 0x0, time 15125487, (953,482), root:(953,513),
    state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 40, synthetic NO, window 0x5400001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 40, synthetic NO, window 0x5400001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   65  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 40, synthetic NO, window 0x5400001,
    root 0xdf, subw 0x0, time 15125490, (953,482), root:(953,513),
    state 0x8, keycode 70 (keysym 0xffc1, F4), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x5400001,
    root 0xdf, subw 0x0, time 15125494, (953,482), root:(953,513),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

ClientMessage event, serial 40, synthetic YES, window 0x5400001,
    message_type 0x13a (WM_PROTOCOLS), format 32, message 0x138 (WM_DELETE_WINDOW)

이 두 이벤트를 전송하기 위해 이러한 키를 얻을 수 있는 방법이 있습니까?

관련 정보