mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
workaround for #45.
This commit is contained in:
@ -10,7 +10,6 @@ import "C"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sync"
|
||||
"time"
|
||||
"unsafe"
|
||||
@ -211,20 +210,6 @@ func GetScreenSize() *types.ScreenSize {
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetKeyboardLayout(layout string) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
if !regexp.MustCompile(`^[a-zA-Z]+$`).MatchString(layout) {
|
||||
return
|
||||
}
|
||||
|
||||
layoutUnsafe := C.CString(layout)
|
||||
defer C.free(unsafe.Pointer(layoutUnsafe))
|
||||
|
||||
C.SetKeyboardLayout(layoutUnsafe)
|
||||
}
|
||||
|
||||
func SetKeyboardModifiers(num_lock int, caps_lock int, scroll_lock int) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
Reference in New Issue
Block a user