Xmodmap은 특정 키를 수정자 키와 함께 누르면 수정자 키를 해제합니다.

Xmodmap은 특정 키를 수정자 키와 함께 누르면 수정자 키를 해제합니다.

내 컴퓨터는 Linux 커널 5.0.0-23-generic을 사용하는 Ubuntu 18.04 LTS입니다.

Shift_R키를 에 다시 매핑 합니다 Mode_switch.

clear Shift
keycode  50 = Shift_L NoSymbol Shift_L
keycode  62 = Mode_switch NoSymbol Mode_switch
add Shift = Shift_L

예를 들어 일부 Shift_L-Shift_R-<key>기호 키는 다음과 같습니다.

keycode  41 = i I I braceleft
keycode  53 = t T T grave

그 중 일부는 잘 작동하지만 다른 일부는 그렇지 않습니다.

예를 들어 Shift_L-Shift_R-F(keycode 41)는 {(올바르게) 인쇄하지만 Shift_L-Shift_R-X(keycode 53)는 아무것도 인쇄하지 않습니다.

그래서 달려가서 (keycode ), (keycode ), (keycode ) xev를 눌렀습니다 .Shift_L50Shift_R62X53

$ xev
KeyPress event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3610499, (1273,328), root:(1347,399),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3611315, (1273,328), root:(1347,399),
    state 0x1, keycode 62 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3612803, (1273,328), root:(1347,399),
    state 0x2001, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3612803, (1273,328), root:(1347,399),
    state 0x2000, keycode 62 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

그런 다음 역순으로 해제합니다.

KeyPress event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3614962, (1273,328), root:(1347,399),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3614962, (1273,328), root:(1347,399),
    state 0x1, keycode 62 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3616673, (1273,328), root:(1347,399),
    state 0x2001, keycode 62 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x4000001,
    root 0x31c, subw 0x0, time 3617441, (1273,328), root:(1347,399),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Shift_L그리고 Shift_R언제 출시되나요 Shift_L-Shift_R-X?


xmodmap기본값과 비교한 모든 변경 사항은 다음과 같습니다.

clear Shift
keycode  20 = minus question question underscore
keycode  24 = v V V V
keycode  25 = k K K K
keycode  26 = r R R R
keycode  27 = y Y Y Y
keycode  28 = q Q Q Q
keycode  29 = x X X X
keycode  30 = a A A A
keycode  31 = f F F F
keycode  32 = u U U U
keycode  33 = d D D D
keycode  34 = z Z Z Z
keycode  35 = dollar asciicircum asciicircum dollar
keycode  36 = slash Escape Escape slash
keycode  38 = h H H H
keycode  39 = j J J plus
keycode  40 = l L L bracketleft
keycode  41 = i I I braceleft
keycode  42 = semicolon apostrophe apostrophe parenleft
keycode  43 = colon quotedbl quotedbl parenright
keycode  44 = o O O braceright
keycode  45 = s S S bracketright
keycode  46 = e E E asterisk
keycode  47 = g G G G
keycode  48 = b B B B
keycode  49 = grave asciitilde asciitilde grave
keycode  51 = backslash bar bar backslash
keycode  52 = m M M M
keycode  53 = t T T grave
keycode  54 = n N N numbersign
keycode  55 = BackSpace backslash backslash BackSpace
keycode  56 = comma less less equal
keycode  57 = period greater greater minus
keycode  58 = Return underscore underscore Return
keycode  59 = c C C percent
keycode  60 = w W W asciitilde
keycode  61 = p P P P
keycode  62 = Mode_switch NoSymbol Mode_switch
add Shift = Shift_L

우물 열쇠(예: Shift_L-Shift_R-F가 됨 {)는 다음과 같습니다.

  • 20, 24, 25, 26, 27, 30, 31, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 56, 57, 61.

잘못된 키(예: Shift_L-Shift_R-X릴리스 Shift_LShift_R)는 다음과 같습니다.

  • 28, 29, 34, 35, 36, 52, 53, 54, 55, 58, 59, 60.

이 두 가지 유형의 키의 차이점은 무엇입니까?

이 이상한 동작을 어떻게 해결할 수 있나요?

관련 정보