aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/platform/XWindowsUtil.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
commitbeb08eb751fa8e1f72042f263316ab5e5ddb596d (patch)
tree3b00df983527648bdae610ac7b88cb639b1f1828 /src/lib/platform/XWindowsUtil.cpp
parentfbc30002ab3438356c0476e70c4577a0310d52c0 (diff)
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/lib/platform/XWindowsUtil.cpp')
-rw-r--r--src/lib/platform/XWindowsUtil.cpp49
1 files changed, 46 insertions, 3 deletions
diff --git a/src/lib/platform/XWindowsUtil.cpp b/src/lib/platform/XWindowsUtil.cpp
index 3c90bd6..7d4bb63 100644
--- a/src/lib/platform/XWindowsUtil.cpp
+++ b/src/lib/platform/XWindowsUtil.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -1250,7 +1250,7 @@ XK_uhorn
// map "Internet" keys to KeyIDs
static const KeySym s_map1008FF[] =
{
- /* 0x00 */ 0, 0, kKeyBrightnessUp, kKeyBrightnessDown, 0, 0, 0, 0,
+ /* 0x00 */ 0, 0, kKeyBrightnessUp, kKeyBrightnessDown, 0, kKeyKbdBrightnessUp, kKeyKbdBrightnessDown, 0,
/* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x10 */ 0, kKeyAudioDown, kKeyAudioMute, kKeyAudioUp,
/* 0x14 */ kKeyAudioPlay, kKeyAudioStop, kKeyAudioPrev, kKeyAudioNext,
@@ -1285,6 +1285,45 @@ static const KeySym s_map1008FF[] =
/* 0xf8 */ 0, 0, 0, 0, 0, 0, 0, 0
};
+// map Sun keyboard keys to KeyIDs
+// This is based on the the "Internet" keymap plus the missing keys
+// Copy/Cut/Open/Paste/Props/Front
+static const KeySym s_map1009FF[] =
+{
+ /* 0x00 */ 0, 0, kKeyBrightnessUp, kKeyBrightnessDown, 0, 0, 0, 0,
+ /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x10 */ 0, kKeyAudioDown, kKeyAudioMute, kKeyAudioUp,
+ /* 0x14 */ kKeyAudioPlay, kKeyAudioStop, kKeyAudioPrev, kKeyAudioNext,
+ /* 0x18 */ kKeyWWWHome, kKeyAppMail, 0, kKeyWWWSearch, 0, 0, 0, 0,
+ /* 0x20 */ 0, 0, 0, 0, 0, 0, kKeyWWWBack, kKeyWWWForward,
+ /* 0x28 */ kKeyWWWStop, kKeyWWWRefresh, 0, 0, kKeyEject, 0, 0, 0,
+ /* 0x30 */ kKeyWWWFavorites, 0, kKeyAppMedia, 0, 0, 0, 0, 0,
+ /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x40 */ kKeyAppUser1, kKeyAppUser2, 0, 0, 0, 0, 0, 0,
+ /* 0x48 */ 0, 0, kKeyMissionControl, kKeyLaunchpad, 0, 0, 0, 0,
+ /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, kKeyCopy,
+ /* 0x58 */ kKeyCut, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x68 */ 0, 0, 0, kKeyOpen, 0, kKeyPaste, 0, 0,
+ /* 0x70 */ kKeyProps, kKeyFront, 0, 0, 0, 0, 0, 0,
+ /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xf8 */ 0, 0, 0, 0, 0, 0, 0, 0
+};
//
// XWindowsUtil
@@ -1546,6 +1585,10 @@ XWindowsUtil::mapKeySymToKeyID(KeySym k)
// "Internet" keys
return s_map1008FF[k & 0xff];
+ case 0x1009ff00:
+ // Additional Left-side keys provided by Sun Microsystems USB keyboards
+ return s_map1009FF[k & 0xff];
+
default: {
// lookup character in table
KeySymMap::const_iterator index = s_keySymToUCS4.find(k);