@@ -71,6 +71,33 @@ func run() error {
71
71
// override ctrl-h to BackSpace
72
72
d .OverrideCtrlH ()
73
73
74
+ // Combos
75
+ combos := []keyboard.Combo {
76
+ {
77
+ Keys : [4 ]keyboard.Keycode {jp .KeyQ , jp .KeyZ },
78
+ OutputKey : jp .KeyMediaMute ,
79
+ },
80
+ {
81
+ Keys : [4 ]keyboard.Keycode {jp .KeyW , jp .KeyX },
82
+ OutputKey : jp .KeyMediaVolumeDec ,
83
+ },
84
+ {
85
+ Keys : [4 ]keyboard.Keycode {jp .KeyE , jp .KeyC },
86
+ OutputKey : jp .KeyMediaVolumeInc ,
87
+ },
88
+ {
89
+ Keys : [4 ]keyboard.Keycode {jp .KeyR , jp .KeyV },
90
+ OutputKey : jp .KeyMediaBrightnessDown ,
91
+ },
92
+ {
93
+ Keys : [4 ]keyboard.Keycode {jp .KeyT , jp .KeyB },
94
+ OutputKey : jp .KeyMediaBrightnessUp ,
95
+ },
96
+ }
97
+ for i , c := range combos {
98
+ d .SetCombo (i , c )
99
+ }
100
+
74
101
loadKeyboardDef ()
75
102
76
103
err := d .Init ()
@@ -81,7 +108,7 @@ func run() error {
81
108
cont := true
82
109
x := NewADCDevice (ax , 0x3000 , 0xD000 , true )
83
110
y := NewADCDevice (ay , 0x3000 , 0xD000 , true )
84
- ticker := time .Tick (2 * time .Millisecond )
111
+ ticker := time .Tick (500 * time .Microsecond )
85
112
cnt := 0
86
113
for cont {
87
114
<- ticker
@@ -90,7 +117,7 @@ func run() error {
90
117
return err
91
118
}
92
119
93
- if cnt % 5 == 0 {
120
+ if cnt % ( 5 * 3 ) == 0 {
94
121
xx := x .Get2 ()
95
122
yy := y .Get2 ()
96
123
//fmt.Printf("%04X %04X %4d %4d %4d %4d\n", x.RawValue, y.RawValue, xx, yy, x.Get(), y.Get())
0 commit comments