diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-10-24 12:02:00 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-10-24 12:02:00 +0200 |
commit | 20a962b64073bc16591928e74bdff5f80f5accad (patch) | |
tree | 6b8079305efd28a7f9a4d3ec40cadcd756ec9239 /xrdp/lang.c | |
parent | 2f919932cb876ac95d2e58290f95580e4e524a13 (diff) | |
download | xrdp-proprietary-20a962b64073bc16591928e74bdff5f80f5accad.tar.gz xrdp-proprietary-20a962b64073bc16591928e74bdff5f80f5accad.zip |
keymap: support combining shift & capslock with altgr
Add support for combining shift & caps lock keys with altgr so that
capital national characters can be written. There was some support for
shift+altgr in xrdp-keygen but it was never actually used.
Diffstat (limited to 'xrdp/lang.c')
-rw-r--r-- | xrdp/lang.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/xrdp/lang.c b/xrdp/lang.c index 5ffff0eb..a2942599 100644 --- a/xrdp/lang.c +++ b/xrdp/lang.c @@ -90,14 +90,26 @@ get_key_info_from_scan_code(int device_flags, int scan_code, int *keys, rv = &(keymap->keys_noshift[index]); } } + else if (shift && caps_lock && altgr) + { + rv = &(keymap->keys_shiftcapslockaltgr[index]); + } else if (shift && caps_lock) { rv = &(keymap->keys_shiftcapslock[index]); } - else if (shift) + else if (shift && altgr) + { + rv = &(keymap->keys_shiftaltgr[index]); + } + else if (shift) { rv = &(keymap->keys_shift[index]); } + else if (caps_lock && altgr) + { + rv = &(keymap->keys_capslockaltgr[index]); + } else if (caps_lock) { rv = &(keymap->keys_capslock[index]); @@ -242,8 +254,11 @@ get_keymaps(int keylayout, struct xrdp_keymap *keymap) km_read_section(fd, "noshift", keymap->keys_noshift); km_read_section(fd, "shift", keymap->keys_shift); km_read_section(fd, "altgr", keymap->keys_altgr); + km_read_section(fd, "shiftaltgr", keymap->keys_shiftaltgr); km_read_section(fd, "capslock", keymap->keys_capslock); + km_read_section(fd, "capslockaltgr", keymap->keys_capslockaltgr); km_read_section(fd, "shiftcapslock", keymap->keys_shiftcapslock); + km_read_section(fd, "shiftcapslockaltgr", keymap->keys_shiftcapslockaltgr); if (g_memcmp(lkeymap, keymap, sizeof(struct xrdp_keymap)) != 0) { |