This repository was archived by the owner on Jan 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -206,12 +206,7 @@ func (k *Keyboard) keyDefinitionFromKey(keyString keyboardlayout.KeyInput) keybo
206
206
var keyDef keyboardlayout.KeyDefinition
207
207
if srcKeyDef .Key != "" {
208
208
keyDef .Key = srcKeyDef .Key
209
- }
210
- if shift != 0 && srcKeyDef .ShiftKey != "" {
211
- keyDef .Key = srcKeyDef .ShiftKey
212
- }
213
- if srcKeyDef .KeyCode != 0 {
214
- keyDef .KeyCode = srcKeyDef .KeyCode
209
+ keyDef .Text = srcKeyDef .Key
215
210
}
216
211
if shift != 0 && srcKeyDef .ShiftKeyCode != 0 {
217
212
keyDef .KeyCode = srcKeyDef .ShiftKeyCode
@@ -225,13 +220,11 @@ func (k *Keyboard) keyDefinitionFromKey(keyString keyboardlayout.KeyInput) keybo
225
220
if srcKeyDef .Location != 0 {
226
221
keyDef .Location = srcKeyDef .Location
227
222
}
228
- if len (srcKeyDef .Key ) == 1 {
229
- keyDef .Text = srcKeyDef .Key
230
- }
231
223
if srcKeyDef .Text != "" {
232
224
keyDef .Text = srcKeyDef .Text
233
225
}
234
226
if shift != 0 && srcKeyDef .ShiftKey != "" {
227
+ keyDef .Key = srcKeyDef .ShiftKey
235
228
keyDef .Text = srcKeyDef .ShiftKey
236
229
}
237
230
// If any modifiers besides shift are pressed, no text should be sent
You can’t perform that action at this time.
0 commit comments