]> git.proxmox.com Git - qemu.git/commit
ui/sdl: Fix handling of caps lock and num lock keys
authorStefan Weil <weil@mail.berlios.de>
Thu, 3 Feb 2011 21:35:07 +0000 (22:35 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 4 Feb 2011 12:53:52 +0000 (06:53 -0600)
commit9a121a2fbf88dd1bc869b1ac2449dc12c27cccfa
tree653a2ec49564b94bd98ca588e6ccbfa24146a562
parent366c2452b111118abcd0dc5f0cd74c16fd63fb96
ui/sdl: Fix handling of caps lock and num lock keys

Starting with SDL version 1.2.14, caps lock and num lock keys
will send a SDL_KEYUP when SDL_DISABLE_LOCK_KEYS=1 is set in
the environment.

The new code sets the environment unconditionally
(it won't harm old versions which do not know it).

The workaround for SDL_KEYUP is only compiled with old SDL versions.

A similar patch without handling of old SDL versions was already
published by Benjamin Drung for Ubuntu.

Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Benjamin Drung <benjamin.drung@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 4e79bcbb96d3c189e50adbdac7b1e28d834ba43e)
ui/sdl.c