mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
workaround for "Keyboard bugs <> → >>".
This commit is contained in:
parent
3e5e8bfec7
commit
536bab14e5
@ -62,6 +62,12 @@ func (manager *DesktopManagerCtx) GetScreenSize() *types.ScreenSize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (manager *DesktopManagerCtx) SetKeyboardMap(kbd types.KeyboardMap) error {
|
func (manager *DesktopManagerCtx) SetKeyboardMap(kbd types.KeyboardMap) error {
|
||||||
|
// Workaround for https://github.com/m1k1o/neko/issues/45
|
||||||
|
// When pressing `shift` + `,` instead of `<` comes `>`.
|
||||||
|
if kbd.Layout == "us" && kbd.Variant == "" {
|
||||||
|
kbd.Variant = "mac"
|
||||||
|
}
|
||||||
|
|
||||||
// TOOD: Use native API.
|
// TOOD: Use native API.
|
||||||
cmd := exec.Command("setxkbmap", "-layout", kbd.Layout, "-variant", kbd.Variant)
|
cmd := exec.Command("setxkbmap", "-layout", kbd.Layout, "-variant", kbd.Variant)
|
||||||
_, err := cmd.Output()
|
_, err := cmd.Output()
|
||||||
|
Loading…
Reference in New Issue
Block a user