aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/vncviewer/KeyMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/tigervnc/vncviewer/KeyMap.java')
-rw-r--r--java/com/tigervnc/vncviewer/KeyMap.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/com/tigervnc/vncviewer/KeyMap.java b/java/com/tigervnc/vncviewer/KeyMap.java
index bce9a53a..62481957 100644
--- a/java/com/tigervnc/vncviewer/KeyMap.java
+++ b/java/com/tigervnc/vncviewer/KeyMap.java
@@ -161,7 +161,7 @@ public class KeyMap {
public static int vkey_to_keysym(KeyEvent ev)
{
- int keyCode = ev.getExtendedKeyCode();
+ int keyCode = get_keycode_fallback_extended(ev);
// Start with keys that either don't generate a symbol, or
// generate the same symbol as some other key.
@@ -217,6 +217,11 @@ public class KeyMap {
return NoSymbol;
}
+ public static int get_keycode_fallback_extended(final KeyEvent ev) {
+ final int keyCode = ev.getKeyCode();
+ return (keyCode == 0) ? ev.getExtendedKeyCode() : keyCode;
+ }
+
private static int vk_to_ascii(int vk, boolean shift) {
char c = 0;
if (code_map_java_to_char.containsKey(vk))