Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 4b05663

Browse files
committed
Remove unnecessary return value in keyboard layout
1 parent 7b504f5 commit 4b05663

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

common/keyboard.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func (k *Keyboard) keyDefinitionFromKey(key keyboardlayout.KeyInput) keyboardlay
189189
}
190190
// Try to find with the shift key value
191191
if !ok {
192-
key, srcKeyDef = k.layout.ShiftKeyDefinition(key)
192+
srcKeyDef = k.layout.ShiftKeyDefinition(key)
193193
shift = k.modifiers | ModifierKeyShift
194194
}
195195

keyboardlayout/common.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ func (kl KeyboardLayout) KeyDefinition(key KeyInput) (KeyDefinition, bool) {
5656

5757
// ShiftKeyDefinition returns shift key definition of a given key input.
5858
// It an empty key definition if it cannot find the key.
59-
func (kl KeyboardLayout) ShiftKeyDefinition(key KeyInput) (KeyInput, KeyDefinition) {
60-
for k, d := range kl.Keys {
59+
func (kl KeyboardLayout) ShiftKeyDefinition(key KeyInput) KeyDefinition {
60+
for _, d := range kl.Keys {
6161
if d.ShiftKey == string(key) {
62-
return k, d
62+
return d
6363
}
6464
}
65-
return key, KeyDefinition{}
65+
return KeyDefinition{}
6666
}
6767

6868
//nolint:gochecknoglobals

0 commit comments

Comments
 (0)