キーボードの状態を表示するコマンド

  • xev (1x) print contents of X events
  • dumpkeys (1) dump keyboard translation tables
  • getkeycodes (8) print kernel scancode-to-keycode mapping table
  • showkey (1) examine the scan codes and keycodes sent by the keyboard

このうちshowkeyでは正しい値が出るので、scancodeからkeycodeへの変換が間違っているんだろう。それをやっているのはXサーバだから、おかしいのは設定ファイルかコンパイルオプションかソースのうちのどれかだな。