use correct KeySyms for runes < 0x100
This commit is contained in:
parent
ed74ab60e4
commit
33c9b815b0
5 changed files with 374 additions and 3 deletions
|
|
@ -117,9 +117,12 @@ keycodes:
|
|||
C.XFlush(p.display)
|
||||
}()
|
||||
for _, runeValue := range text {
|
||||
keysym := C.KeySym(0x01000000 + runeValue)
|
||||
keysym, err := runeToKeysym(runeValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for i := range keycodeMapping {
|
||||
keycodeMapping[i] = keysym
|
||||
keycodeMapping[i] = C.KeySym(keysym)
|
||||
}
|
||||
C.XChangeKeyboardMapping(p.display, C.int(emptyKeycode), keysymsPerKeycode,
|
||||
(*C.KeySym)(unsafe.Pointer(&keycodeMapping[0])), 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue