use correct KeySyms for runes < 0x100

This commit is contained in:
Unrud 2018-08-23 17:12:36 +02:00
parent ed74ab60e4
commit 33c9b815b0
5 changed files with 374 additions and 3 deletions

View file

@ -193,7 +193,10 @@ func (p *portalPlugin) KeyboardText(text string) error {
}
inVardict := make(map[string]dbus.Variant)
for _, runeValue := range text {
keysym := int32(0x01000000 + runeValue)
keysym, err := runeToKeysym(runeValue)
if err != nil {
return err
}
for _, state := range [...]uint32{btnPressed, btnReleased} {
if err := p.remoteDesktop.Call(
"org.freedesktop.portal.RemoteDesktop.NotifyKeyboardKeysym",