mirror of
https://github.com/vidarh/ruby-x11
synced 2024-12-26 09:59:02 +01:00
333 lines
11 KiB
Ruby
333 lines
11 KiB
Ruby
#!/usr/bin/ruby
|
|
|
|
module X11
|
|
# From /usr/lib/X11; FIXME: Not complete
|
|
KeySyms = {
|
|
0x01b7 => :XK_caron,
|
|
0x01bd => :XK_doubleacute,
|
|
|
|
0xff08 => :backspace,
|
|
0xff09 => :tab,
|
|
0xff0a => :linefeed,
|
|
0xff0b => :clear,
|
|
0xff0d => :enter,
|
|
0xfe01 => :XK_ISO_Lock,
|
|
0xfe02 => :XK_ISO_Level2_Latch,
|
|
0xfe03 => :XK_ISO_Level3_Shift,
|
|
0xfe04 => :XK_ISO_Level3_Latch,
|
|
0xfe05 => :XK_ISO_Level3_Lock,
|
|
0xfe06 => :XK_ISO_Group_Latch,
|
|
0xfe07 => :XK_ISO_Group_Lock,
|
|
0xfe08 => :XK_ISO_Next_Group,
|
|
0xfe09 => :XK_ISO_Next_Group_Lock,
|
|
0xfe0a => :XK_ISO_Prev_Group,
|
|
0xfe0b => :XK_ISO_Prev_Group_Lock,
|
|
0xfe0c => :XK_ISO_First_Group,
|
|
0xfe0d => :XK_ISO_First_Group_Lock,
|
|
0xfe0e => :XK_ISO_Last_Group,
|
|
0xfe0f => :XK_ISO_Last_Group_Lock,
|
|
0xfe11 => :XK_ISO_Level5_Shift,
|
|
0xfe12 => :XK_ISO_Level5_Latch,
|
|
0xfe13 => :XK_ISO_Level5_Lock,
|
|
0xfe20 => :XK_ISO_Left_Tab,
|
|
0xfe21 => :XK_ISO_Move_Line_Up,
|
|
0xfe22 => :XK_ISO_Move_Line_Down,
|
|
0xfe23 => :XK_ISO_Partial_Line_Up,
|
|
0xfe24 => :XK_ISO_Partial_Line_Down,
|
|
0xfe25 => :XK_ISO_Partial_Space_Left,
|
|
0xfe26 => :XK_ISO_Partial_Space_Right,
|
|
0xfe27 => :XK_ISO_Set_Margin_Left,
|
|
0xfe28 => :XK_ISO_Set_Margin_Right,
|
|
0xfe29 => :XK_ISO_Release_Margin_Left,
|
|
0xfe2a => :XK_ISO_Release_Margin_Right,
|
|
0xfe2b => :XK_ISO_Release_Both_Margins,
|
|
0xfe2c => :XK_ISO_Fast_Cursor_Left,
|
|
0xfe2d => :XK_ISO_Fast_Cursor_Right,
|
|
0xfe2e => :XK_ISO_Fast_Cursor_Up,
|
|
0xfe2f => :XK_ISO_Fast_Cursor_Down,
|
|
0xfe30 => :XK_ISO_Continuous_Underline,
|
|
0xfe31 => :XK_ISO_Discontinuous_Underline,
|
|
0xfe32 => :XK_ISO_Emphasize,
|
|
0xfe33 => :XK_ISO_Center_Object,
|
|
0xfe34 => :XK_ISO_Enter,
|
|
0xff13 => :XK_Pause,
|
|
0xff14 => :XK_Scroll_Lock,
|
|
0xff15 => :XK_Sys_Req,
|
|
0xff1b => :XK_Escape,
|
|
0xffff => :XK_Delete,
|
|
0xff20 => :XK_Multi_key,
|
|
0xff21 => :XK_Kanji,
|
|
0xff22 => :XK_Muhenkan,
|
|
0xff23 => :XK_Henkan,
|
|
0xff24 => :XK_Romaji,
|
|
0xff25 => :XK_Hiragana,
|
|
0xff26 => :XK_Katakana,
|
|
0xff27 => :XK_Hiragana_Katakana,
|
|
0xff28 => :XK_Zenkaku,
|
|
0xff29 => :XK_Hankaku,
|
|
0xff2a => :XK_Zenkaku_Hankaku,
|
|
0xff2b => :XK_Touroku,
|
|
0xff2c => :XK_Massyo,
|
|
0xff2d => :XK_Kana_Lock,
|
|
0xff2e => :XK_Kana_Shift,
|
|
0xff2f => :XK_Eisu_Shift,
|
|
0xff30 => :XK_Eisu_toggle,
|
|
0xff31 => :Unknown_FF31,
|
|
0xff34 => :Unknown_FF34,
|
|
0xff37 => :XK_Codeinput,
|
|
0xff3c => :XK_SingleCandidate,
|
|
0xff3d => :XK_MultipleCandidate,
|
|
0xff3e => :XK_PreviousCandidate,
|
|
0xff50 => :XK_Home,
|
|
0xff51 => :XK_Left,
|
|
0xff52 => :XK_Up,
|
|
0xff53 => :XK_Right,
|
|
0xff54 => :XK_Down,
|
|
0xff55 => :XK_Page_Up,
|
|
0xff56 => :XK_Page_Down,
|
|
0xff57 => :XK_End,
|
|
0xff58 => :XK_Begin,
|
|
0xff60 => :XK_Select,
|
|
0xff61 => :XK_Print,
|
|
0xff62 => :XK_Execute,
|
|
0xff63 => :XK_Insert,
|
|
0xff65 => :XK_Undo,
|
|
0xff66 => :XK_Redo,
|
|
0xff67 => :XK_Menu,
|
|
0xff68 => :XK_Find,
|
|
0xff69 => :XK_Cancel,
|
|
0xff6a => :XK_Help,
|
|
0xff6b => :XK_Break,
|
|
0xff7e => :XK_Mode_switch,
|
|
0xff7f => :XK_Num_Lock,
|
|
0xff80 => :XK_KP_Space,
|
|
0xff89 => :XK_KP_Tab,
|
|
0xff8d => :XK_KP_Enter,
|
|
0xff95 => :XK_KP_Home,
|
|
0xff96 => :XK_KP_Left,
|
|
0xff97 => :XK_KP_Up,
|
|
0xff98 => :XK_KP_Right,
|
|
0xff99 => :XK_KP_Down,
|
|
0xff9a => :XK_KP_Page_Up,
|
|
0xff9b => :XK_KP_Page_Down,
|
|
0xff9c => :XK_KP_End,
|
|
0xff9d => :XK_KP_Begin,
|
|
0xff9e => :XK_KP_Insert,
|
|
0xff9f => :XK_KP_Delete,
|
|
0xffaa => :XK_KP_Multiply,
|
|
0xffab => :XK_KP_Add,
|
|
0xffac => :XK_KP_Separator,
|
|
0xffad => :XK_KP_Subtract,
|
|
0xffae => :XK_KP_Decimal,
|
|
0xffaf => :XK_KP_Divide,
|
|
0xffbd => :XK_KP_Equal,
|
|
0xffbe => :f1,
|
|
0xffbf => :f2,
|
|
0xffc0 => :f3,
|
|
0xffc1 => :f4, # And so on
|
|
|
|
|
|
0xffe1 => :XK_Shift_L,
|
|
0xffe2 => :XK_Shift_R,
|
|
0xffe3 => :XK_Control_L,
|
|
0xffe4 => :XK_Control_R,
|
|
0xffe5 => :XK_Caps_Lock,
|
|
0xffe6 => :XK_Shift_Lock,
|
|
0xffe7 => :XK_Meta_L,
|
|
0xffe8 => :XK_Meta_R,
|
|
0xffe9 => :XK_Alt_L,
|
|
0xffea => :XK_Alt_R,
|
|
0xffeb => :XK_Super_L,
|
|
0xffec => :XK_Super_R,
|
|
0xffed => :XK_Hyper_L,
|
|
0xffee => :XK_Hyper_R,
|
|
|
|
0x1005FF70 => :SunProps,
|
|
0x1005FF71 => :SunFront,
|
|
|
|
0x1008FF01 => :XF86XK_ModeLock,
|
|
0x1008FF02 => :XF86XK_MonBrightnessUp,
|
|
0x1008FF03 => :XF86XK_MonBrightnessDown,
|
|
0x1008FF04 => :XF86XK_KbdLightOnOff,
|
|
0x1008FF05 => :XF86XK_KbdBrightnessUp,
|
|
0x1008FF06 => :XF86XK_KbdBrightnessDown,
|
|
0x1008FF07 => :XF86XK_MonBrightnessCycle,
|
|
0x1008FF10 => :XF86XK_Standby,
|
|
0x1008FF11 => :XF86XK_AudioLowerVolume,
|
|
0x1008FF12 => :XF86XK_AudioMute,
|
|
0x1008FF13 => :XF86XK_AudioRaiseVolume,
|
|
0x1008FF14 => :XF86XK_AudioPlay,
|
|
0x1008FF15 => :XF86XK_AudioStop,
|
|
0x1008FF16 => :XF86XK_AudioPrev,
|
|
0x1008FF17 => :XF86XK_AudioNext,
|
|
0x1008FF18 => :XF86XK_HomePage,
|
|
0x1008FF19 => :XF86XK_Mail,
|
|
0x1008FF1A => :XF86XK_Start,
|
|
0x1008FF1B => :XF86XK_Search,
|
|
0x1008FF1C => :XF86XK_AudioRecord,
|
|
0x1008FF1D => :XF86XK_Calculator,
|
|
0x1008FF1E => :XF86XK_Memo,
|
|
0x1008FF1F => :XF86XK_ToDoList,
|
|
0x1008FF20 => :XF86XK_Calendar,
|
|
0x1008FF21 => :XF86XK_PowerDown,
|
|
0x1008FF22 => :XF86XK_ContrastAdjust,
|
|
0x1008FF23 => :XF86XK_RockerUp,
|
|
0x1008FF24 => :XF86XK_RockerDown,
|
|
0x1008FF25 => :XF86XK_RockerEnter,
|
|
0x1008FF26 => :XF86XK_Back,
|
|
0x1008FF27 => :XF86XK_Forward,
|
|
0x1008FF28 => :XF86XK_Stop,
|
|
0x1008FF29 => :XF86XK_Refresh,
|
|
0x1008FF2A => :XF86XK_PowerOff,
|
|
0x1008FF2B => :XF86XK_WakeUp,
|
|
0x1008FF2C => :XF86XK_Eject,
|
|
0x1008FF2D => :XF86XK_ScreenSaver,
|
|
0x1008FF2E => :XF86XK_WWW,
|
|
0x1008FF2F => :XF86XK_Sleep,
|
|
0x1008FF30 => :XF86XK_Favorites,
|
|
0x1008FF31 => :XF86XK_AudioPause,
|
|
0x1008FF32 => :XF86XK_AudioMedia,
|
|
0x1008FF33 => :XF86XK_MyComputer,
|
|
0x1008FF34 => :XF86XK_VendorHome,
|
|
0x1008FF35 => :XF86XK_LightBulb,
|
|
0x1008FF36 => :XF86XK_Shop,
|
|
0x1008FF37 => :XF86XK_History,
|
|
0x1008FF38 => :XF86XK_OpenURL,
|
|
0x1008FF39 => :XF86XK_AddFavorite,
|
|
0x1008FF3A => :XF86XK_HotLinks,
|
|
0x1008FF3B => :XF86XK_BrightnessAdjust,
|
|
0x1008FF3C => :XF86XK_Finance,
|
|
0x1008FF3D => :XF86XK_Community,
|
|
0x1008FF3E => :XF86XK_AudioRewind,
|
|
0x1008FF3F => :XF86XK_BackForward,
|
|
0x1008FF40 => :XF86XK_Launch0,
|
|
0x1008FF41 => :XF86XK_Launch1,
|
|
0x1008FF42 => :XF86XK_Launch2,
|
|
0x1008FF43 => :XF86XK_Launch3,
|
|
0x1008FF44 => :XF86XK_Launch4,
|
|
0x1008FF45 => :XF86XK_Launch5,
|
|
0x1008FF46 => :XF86XK_Launch6,
|
|
0x1008FF47 => :XF86XK_Launch7,
|
|
0x1008FF48 => :XF86XK_Launch8,
|
|
0x1008FF49 => :XF86XK_Launch9,
|
|
0x1008FF4A => :XF86XK_LaunchA,
|
|
0x1008FF4B => :XF86XK_LaunchB,
|
|
0x1008FF4C => :XF86XK_LaunchC,
|
|
0x1008FF4D => :XF86XK_LaunchD,
|
|
0x1008FF4E => :XF86XK_LaunchE,
|
|
0x1008FF4F => :XF86XK_LaunchF,
|
|
0x1008FF50 => :XF86XK_ApplicationLeft,
|
|
0x1008FF51 => :XF86XK_ApplicationRight,
|
|
0x1008FF52 => :XF86XK_Book,
|
|
0x1008FF53 => :XF86XK_CD,
|
|
0x1008FF54 => :XF86XK_Calculater,
|
|
0x1008FF55 => :XF86XK_Clear,
|
|
0x1008FF56 => :XF86XK_Close,
|
|
0x1008FF57 => :XF86XK_Copy,
|
|
0x1008FF58 => :XF86XK_Cut,
|
|
0x1008FF59 => :XF86XK_Display,
|
|
0x1008FF5A => :XF86XK_DOS,
|
|
0x1008FF5B => :XF86XK_Documents,
|
|
0x1008FF5C => :XF86XK_Excel,
|
|
0x1008FF5D => :XF86XK_Explorer,
|
|
0x1008FF5E => :XF86XK_Game,
|
|
0x1008FF5F => :XF86XK_Go,
|
|
0x1008FF60 => :XF86XK_iTouch,
|
|
0x1008FF61 => :XF86XK_LogOff,
|
|
0x1008FF62 => :XF86XK_Market,
|
|
0x1008FF63 => :XF86XK_Meeting,
|
|
0x1008FF65 => :XF86XK_MenuKB,
|
|
0x1008FF66 => :XF86XK_MenuPB,
|
|
0x1008FF67 => :XF86XK_MySites,
|
|
0x1008FF68 => :XF86XK_New,
|
|
0x1008FF69 => :XF86XK_News,
|
|
0x1008FF6A => :XF86XK_OfficeHome,
|
|
0x1008FF6B => :XF86XK_Open,
|
|
0x1008FF6C => :XF86XK_Option,
|
|
0x1008FF6D => :XF86XK_Paste,
|
|
0x1008FF6E => :XF86XK_Phone,
|
|
0x1008FF70 => :XF86XK_Q,
|
|
0x1008FF72 => :XF86XK_Reply,
|
|
0x1008FF73 => :XF86XK_Reload,
|
|
0x1008FF74 => :XF86XK_RotateWindows,
|
|
0x1008FF75 => :XF86XK_RotationPB,
|
|
0x1008FF76 => :XF86XK_RotationKB,
|
|
0x1008FF77 => :XF86XK_Save,
|
|
0x1008FF78 => :XF86XK_ScrollUp,
|
|
0x1008FF79 => :XF86XK_ScrollDown,
|
|
0x1008FF7A => :XF86XK_ScrollClick,
|
|
0x1008FF7B => :XF86XK_Send,
|
|
0x1008FF7C => :XF86XK_Spell,
|
|
0x1008FF7D => :XF86XK_SplitScreen,
|
|
0x1008FF7E => :XF86XK_Support,
|
|
0x1008FF7F => :XF86XK_TaskPane,
|
|
0x1008FF80 => :XF86XK_Terminal,
|
|
0x1008FF81 => :XF86XK_Tools,
|
|
0x1008FF82 => :XF86XK_Travel,
|
|
0x1008FF84 => :XF86XK_UserPB,
|
|
0x1008FF85 => :XF86XK_User1KB,
|
|
0x1008FF86 => :XF86XK_User2KB,
|
|
0x1008FF87 => :XF86XK_Video,
|
|
0x1008FF88 => :XF86XK_WheelButton,
|
|
0x1008FF89 => :XF86XK_Word,
|
|
0x1008FF8A => :XF86XK_Xfer,
|
|
0x1008FF8B => :XF86XK_ZoomIn,
|
|
0x1008FF8C => :XF86XK_ZoomOut,
|
|
0x1008FF8D => :XF86XK_Away,
|
|
0x1008FF8E => :XF86XK_Messenger,
|
|
0x1008FF8F => :XF86XK_WebCam,
|
|
0x1008FF90 => :XF86XK_MailForward,
|
|
0x1008FF91 => :XF86XK_Pictures,
|
|
0x1008FF92 => :XF86XK_Music,
|
|
0x1008FF93 => :XF86XK_Battery,
|
|
0x1008FF94 => :XF86XK_Bluetooth,
|
|
0x1008FF95 => :XF86XK_WLAN,
|
|
0x1008FF96 => :XF86XK_UWB,
|
|
0x1008FF97 => :XF86XK_AudioForward,
|
|
0x1008FF98 => :XF86XK_AudioRepeat,
|
|
0x1008FF99 => :XF86XK_AudioRandomPlay,
|
|
0x1008FF9A => :XF86XK_Subtitle,
|
|
0x1008FF9B => :XF86XK_AudioCycleTrack,
|
|
0x1008FF9C => :XF86XK_CycleAngle,
|
|
0x1008FF9D => :XF86XK_FrameBack,
|
|
0x1008FF9E => :XF86XK_FrameForward,
|
|
0x1008FF9F => :XF86XK_Time,
|
|
0x1008FFA0 => :XF86XK_Select,
|
|
0x1008FFA1 => :XF86XK_View,
|
|
0x1008FFA2 => :XF86XK_TopMenu,
|
|
0x1008FFA3 => :XF86XK_Red,
|
|
0x1008FFA4 => :XF86XK_Green,
|
|
0x1008FFA5 => :XF86XK_Yellow,
|
|
0x1008FFA6 => :XF86XK_Blue,
|
|
0x1008FFA7 => :XF86XK_Suspend,
|
|
0x1008FFA8 => :XF86XK_Hibernate,
|
|
0x1008FFA9 => :XF86XK_TouchpadToggle,
|
|
0x1008FFB0 => :XF86XK_TouchpadOn,
|
|
0x1008FFB1 => :XF86XK_TouchpadOff,
|
|
0x1008FFB2 => :XF86XK_AudioMicMute,
|
|
0x1008FFB3 => :XF86XK_Keyboard,
|
|
0x1008FFB4 => :XF86XK_WWAN,
|
|
0x1008FFB5 => :XF86XK_RFKill,
|
|
0x1008FFB6 => :XF86XK_AudioPreset,
|
|
0x1008FFB7 => :XF86XK_RotationLockToggle,
|
|
0x1008FFB8 => :XF86XK_FullScreen,
|
|
0x1008FE01 => :XF86XK_Switch_VT_1,
|
|
0x1008FE02 => :XF86XK_Switch_VT_2,
|
|
0x1008FE03 => :XF86XK_Switch_VT_3,
|
|
0x1008FE04 => :XF86XK_Switch_VT_4,
|
|
0x1008FE05 => :XF86XK_Switch_VT_5,
|
|
0x1008FE06 => :XF86XK_Switch_VT_6,
|
|
0x1008FE07 => :XF86XK_Switch_VT_7,
|
|
0x1008FE08 => :XF86XK_Switch_VT_8,
|
|
0x1008FE09 => :XF86XK_Switch_VT_9,
|
|
0x1008FE0A => :XF86XK_Switch_VT_10,
|
|
0x1008FE0B => :XF86XK_Switch_VT_11,
|
|
0x1008FE0C => :XF86XK_Switch_VT_12,
|
|
0x1008FE20 => :XF86XK_Ungrab,
|
|
0x1008FE21 => :XF86XK_ClearGrab,
|
|
0x1008FE22 => :XF86XK_Next_VMode,
|
|
0x1008FE23 => :XF86XK_Prev_VMode,
|
|
0x1008FE24 => :XF86XK_LogWindowTree,
|
|
0x1008FE25 => :XF86XK_LogGrabInfo,
|
|
}
|
|
end
|