MacOS – Wireshark keyboard layout is incorrect

macoswiresharkx11

I just installed Wireshark Version 1.12.0 (v1.12.0-0-g4fab41a from master-1.12) on OSX 10.9.4 with XQuartz 2.7.7.

Wireshark is doing something zany with my keyboard layout, but other X11 applications are not affected. I don't see a keyboard layout option in the Wireshark interface and Google searchs have been fruitless.

Example of what zany means:

The z key is now 5 (shift Z yields %). 5 is now i. <tab> is b. <Space> is n.

There might be a pattern, but it's not obvious to me (the number of bytes in the key remap does not follow a pattern either).

Anyone have suggestions?

Best Answer

And solved: X11 builds a key mapping on install. On my machine, I have another language installed, and my ~/.Xmodmap file was causing the issue.

By cross-referencing the virtual mapping for the keyboard located at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h with the .Xmodmap as follows:

keycode   8 =
keycode   9 = Escape NoSymbol Escape
keycode  10 = 1 exclam 1 exclam
keycode  11 = 2 at 2 at
keycode  12 = 3 numbersign 3 numbersign
keycode  13 = 4 dollar 4 dollar
keycode  14 = 5 percent 5 percent
keycode  15 = 6 asciicircum 6 asciicircum
keycode  16 = 7 ampersand 7 ampersand
keycode  17 = 8 asterisk 8 asterisk
keycode  18 = 9 parenleft 9 parenleft
keycode  19 = 0 parenright 0 parenright
keycode  20 = minus underscore minus underscore
keycode  21 = equal plus equal plus
keycode  22 = BackSpace BackSpace BackSpace BackSpace
keycode  23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode  24 = q Q q Q
keycode  25 = w W w W
keycode  26 = e E e E
keycode  27 = r R r R
keycode  28 = t T t T
keycode  29 = y Y y Y
keycode  30 = u U u U
keycode  31 = i I i I
keycode  32 = o O o O
keycode  33 = p P p P
keycode  34 = bracketleft braceleft bracketleft braceleft
keycode  35 = bracketright braceright bracketright braceright
keycode  36 = Return NoSymbol Return
keycode  37 = Control_L NoSymbol Control_L
keycode  38 = a A a A
keycode  39 = s S s S
keycode  40 = d D d D
keycode  41 = f F f F
keycode  42 = g G g G
keycode  43 = h H h H
keycode  44 = j J j J
keycode  45 = k K k K
keycode  46 = l L l L
keycode  47 = semicolon colon semicolon colon
keycode  48 = apostrophe quotedbl apostrophe quotedbl
keycode  49 = grave asciitilde grave asciitilde
keycode  50 = Shift_L NoSymbol Shift_L
keycode  51 = backslash bar backslash bar
keycode  52 = z Z z Z
...

we can see mismatches. I assume that the other applications that I tested disregard the user customization.