Skip to content

Commit 88919b9

Browse files
giuseongitsago35
andcommitted
1 parent a8864af commit 88919b9

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

keyboard.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,16 @@ func (d *Device) RunMacro(no uint8) error {
709709
k.Keyboard.Down(keycodes.KeyLeftShift)
710710
k.Keyboard.Press(kc ^ keycodes.ShiftMask)
711711
k.Keyboard.Up(keycodes.KeyLeftShift)
712+
case keycodes.TypeNormal | keycodes.AltGrMask:
713+
k.Keyboard.Down(keycodes.KeyRightAlt)
714+
k.Keyboard.Press(kc ^ keycodes.AltGrMask)
715+
k.Keyboard.Up(keycodes.KeyRightAlt)
716+
case keycodes.TypeNormal | keycodes.AltGrMask | keycodes.ShiftMask:
717+
k.Keyboard.Down(keycodes.KeyRightAlt)
718+
k.Keyboard.Down(keycodes.KeyLeftShift)
719+
k.Keyboard.Press(kc ^ keycodes.AltGrMask ^ keycodes.ShiftMask)
720+
k.Keyboard.Up(keycodes.KeyRightAlt)
721+
k.Keyboard.Up(keycodes.KeyLeftShift)
712722
default:
713723
//skip
714724
}

keycodes/japanese/keycodes.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ const (
135135
KeyWindows = keycodes.TypeNormal | 0xE3
136136
KeyRightCtrl = keycodes.TypeNormal | 0xE4
137137
KeyRightShift = keycodes.TypeNormal | 0xE5
138+
KeyRightAlt = keycodes.TypeNormal | 0xE6
138139
)
139140

140141
const (

keycodes/keycodes.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const (
4747
KeyWindows = TypeNormal | 0xE3
4848
KeyRightCtrl = TypeNormal | 0xE4
4949
KeyRightShift = TypeNormal | 0xE5
50+
KeyRightAlt = TypeNormal | 0xE6
5051

5152
KeyH = TypeNormal | 0x0B
5253
KeyBackspace = TypeNormal | 0x2A
@@ -95,6 +96,7 @@ const (
9596
// from machine/usb/hid/keyboard
9697
const (
9798
ShiftMask = 0x0400
99+
AltGrMask = 0x0800
98100
)
99101

100102
const (

0 commit comments

Comments
 (0)