change kbd layout using setxkbmap

This commit is contained in:
Miroslav Šedivý
2020-06-15 23:14:23 +02:00
parent 70e8b215cb
commit 4a7800c93f
6 changed files with 27 additions and 2 deletions

View File

@ -210,6 +210,16 @@ func GetScreenSize() *types.ScreenSize {
return nil
}
func SetKeyboard(layout string) {
mu.Lock()
defer mu.Unlock()
layoutUnsafe := C.CString(layout)
defer C.free(unsafe.Pointer(layoutUnsafe))
C.SetKeyboard(layoutUnsafe)
}
//export goCreateScreenSize
func goCreateScreenSize(index C.int, width C.int, height C.int, mwidth C.int, mheight C.int) {
ScreenConfigurations[int(index)] = types.ScreenConfiguration{