키보드는 [Alt_L] + {ijkl}을 화살표 {위, 왼쪽, 아래, 오른쪽}으로 다시 매핑합니다.

키보드는 [Alt_L] + {ijkl}을 화살표 {위, 왼쪽, 아래, 오른쪽}으로 다시 매핑합니다.

화살표 키처럼 작동하려면 Alt와 함께 'ijkl'을 사용하고 싶습니다. 즉, Alt+i = 위쪽, Alt+K = 아래쪽 등.

나는 시도했다xmodmap수행원이 답변. 대답은 Alt 수정 키가 xmodmap의 세 번째 열이라고 말합니다. 단, xmodmap -e "keycode 31 = i I Up"Alt+i까지는 할당하지 않습니다.

나는 또한 시도했다xbindkeys수행원또 다른 대답. 그러나 이것은 잘 작동하지 않습니다.

"xvkbd -xsendevent -text '\[Left]'"
m:0x18 + c:44
alt + j

"xvkbd -xsendevent -text '\[Down]'"
m:0x18 + c:45
alt + k

"xvkbd -xsendevent -text '\[Right]'"
m:0x18 + c:46
alt + l

"xvkbd -xsendevent -text '\[Up]'"
m:0x18 + c:31
alt + i

터미널을 열기 위해 ctrl+alt+t와 같은 다른 Alt 조합을 손상시키지 않는 솔루션을 높이 평가하겠습니다.

편집 : (답변에 도움이된다면) 내가 한 후에xmodmapxev를 실행하고 Alt+i를 누르면 다음이 반환됩니다.

KeyPress event, serial 37, synthetic NO, window 0x2e00001,
    root 0x66b, subw 0x0, time 35626163, (161,-15), root:(261,144),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

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

KeyPress event, serial 37, synthetic YES, window 0x2e00001,
    root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic YES, window 0x2e00001,
    root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 37, synthetic YES, window 0x2e00001,
    root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x0, keycode 111 (keysym 0xff52, Up), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic YES, window 0x2e00001,
    root 0x66b, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x0, keycode 111 (keysym 0xff52, Up), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

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

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  4294967216 0   0   0   0   0   0   0   1   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 37, synthetic NO, window 0x2e00001,
    root 0x66b, subw 0x0, time 35628444, (161,-15), root:(261,144),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

첫째, 이유를 모르겠습니다.Shift_L나타나다. 둘째, 다음을 보여줍니다.위로keypress는 어떻게든 등록되지만 아무런 효과가 없습니다. 예를 들어 커서를 위로 이동하지 않습니다.

(저는 우분투 20.04를 사용합니다)

답변1

나는 해당 파일을 편집하여 이 작업을 수행했습니다./usr/share/X11/xkb/symbols예배 규칙서. 저는 독일어 키보드 레이아웃을 사용하기 때문에 이것은 다음과 같습니다../de파일. 첫 번째 블록에 다음 줄을 추가/변경했습니다.

xkb_symbols "기본" {

...

key <AD08>  { [         i,          I,    Up,          Up ] };
key <AC07>  { [         j,          J,    Left,        Left ] };
key <AC08>  { [         k,          K,    Down,        Down ] };
key <AC09>  { [         l,          L,    Right,       Right ] };

...

include "level3(alt_switch)"

};

처음 몇 줄에서는 ALTGR + I = Up 등이 됩니다. 저는 이러한 조합을 사용하지 않기 때문에 괜찮습니다. 그런 다음 마지막 줄은 본질적으로 ALT가 ALTGR과 동일한 작업을 수행하도록 만듭니다. 이것은 작업을 수행하지만 언급했듯이 다른 ALT 조합을 엉망으로 만들기 때문에 다소 쿨하지 않습니다. 이에 대한 나의 해결책은 단순히 ALT를 사용하는 것이 아니라 좋은 위치에 있고 어쨌든 필요하지 않은 다른 키인 RWIN을 사용하는 것이었습니다. 즉, 마지막 줄을 다음으로 바꿨습니다.

include "level3(rwin_switch)" 

이렇게 하면 이제 새끼손가락으로 편리하게 RWIN을 눌러 ijkl을 화살표 키로 사용할 수 있습니다. 좋은 점은 다른 솔루션과 달리 SHIFT + RWIN + L을 눌러 텍스트를 선택할 수 있다는 것입니다.

도움이 되었기를 바랍니다 :)

관련 정보