mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-28 05:36:02 +03:00
Applied patch from grmcdorman at users dot sourceforge dot net to
support keymaps that have only uppercase letters, which is the case by default on the Sun X server (for US keyboards anyway).
This commit is contained in:
parent
eb65726ce7
commit
dedb48d244
@ -28,6 +28,7 @@
|
||||
# include <X11/Xutil.h>
|
||||
# define XK_MISCELLANY
|
||||
# define XK_XKB_KEYS
|
||||
# define XK_LATIN1
|
||||
# include <X11/keysymdef.h>
|
||||
# if defined(HAVE_X11_EXTENSIONS_XTEST_H)
|
||||
# include <X11/extensions/XTest.h>
|
||||
@ -1268,6 +1269,15 @@ CXWindowsSecondaryScreen::findKey(KeyID id, KeyModifierMask& mask) const
|
||||
|
||||
// find the keycodes that generate the keysym
|
||||
KeyCodeIndex index = m_keycodeMap.find(keysym);
|
||||
if (index == noKey() && keysym >= XK_a && keysym <= XK_z) {
|
||||
// for an unfound lower case alpha, try the equivalent upper
|
||||
// case (as some keymaps only include the upper case, notably
|
||||
// Sun Solaris).
|
||||
// Note that this depends on the keysyms for 'a' through 'z'
|
||||
// and 'A' through 'Z' being contiguous. This is currently
|
||||
// the case and extremely unlikely to change.
|
||||
index = m_keycodeMap.find(keysym + XK_A - XK_a);
|
||||
}
|
||||
if (index == noKey()) {
|
||||
// try backup keysym for certain keys (particularly the numpad
|
||||
// keys since most laptops don't have a separate numpad and the
|
||||
|
Loading…
Reference in New Issue
Block a user