Skip to content
Browse files

added KS_EXTRA (0xfd) escape sequences from vim source

  • Loading branch information...
1 parent 5165bb2 commit c8332367954838610527890cbd5e94e5a9371ac6 @fgalassi fgalassi committed
Showing with 97 additions and 0 deletions.
  1. +97 −0 lib/vimgolf/keylog.rb
View
97 lib/vimgolf/keylog.rb
@@ -104,6 +104,103 @@ def self.scan(input)
when "kB"; "<S-Tab>"
when "\xffX"; "<C-@>"
+ when "\xfd\x4"; "<S-Up>"
+ when "\xfd\x5"; "<S-Down>"
+ when "\xfd\x6"; "<S-F1>"
+ when "\xfd\x7"; "<S-F2>"
+ when "\xfd\x8"; "<S-F3>"
+ when "\xfd\x9"; "<S-F4>"
+ when "\xfd\xa"; "<S-F5>"
+ when "\xfd\xb"; "<S-F6>"
+ when "\xfd\xc"; "<S-F7>"
+ when "\xfd\xd"; "<S-F9>"
+ when "\xfd\xe"; "<S-F10>"
+ when "\xfd\xf"; "<S-F10>"
+ when "\xfd\x10"; "<S-F11>"
+ when "\xfd\x11"; "<S-F12>"
+ when "\xfd\x12"; "<S-F13>"
+ when "\xfd\x13"; "<S-F14>"
+ when "\xfd\x14"; "<S-F15>"
+ when "\xfd\x15"; "<S-F16>"
+ when "\xfd\x16"; "<S-F17>"
+ when "\xfd\x17"; "<S-F18>"
+ when "\xfd\x18"; "<S-F19>"
+ when "\xfd\x19"; "<S-F20>"
+ when "\xfd\x1a"; "<S-F21>"
+ when "\xfd\x1b"; "<S-F22>"
+ when "\xfd\x1c"; "<S-F23>"
+ when "\xfd\x1d"; "<S-F24>"
+ when "\xfd\x1e"; "<S-F25>"
+ when "\xfd\x1f"; "<S-F26>"
+ when "\xfd\x20"; "<S-F27>"
+ when "\xfd\x21"; "<S-F28>"
+ when "\xfd\x22"; "<S-F29>"
+ when "\xfd\x23"; "<S-F30>"
+ when "\xfd\x24"; "<S-F31>"
+ when "\xfd\x25"; "<S-F32>"
+ when "\xfd\x26"; "<S-F33>"
+ when "\xfd\x27"; "<S-F34>"
+ when "\xfd\x28"; "<S-F35>"
+ when "\xfd\x29"; "<S-F36>"
+ when "\xfd\x2a"; "<S-F37>"
+ when "\xfd\x2b"; "<Mouse>"
+ when "\xfd\x2c"; "<LeftMouse>"
+ when "\xfd\x2d"; "<LeftDrag>"
+ when "\xfd\x2e"; "<LeftRelease>"
+ when "\xfd\x2f"; "<MiddleMouse>"
+ when "\xfd\x30"; "<MiddleDrag>"
+ when "\xfd\x31"; "<MiddleRelease>"
+ when "\xfd\x32"; "<RightMouse>"
+ when "\xfd\x33"; "<RightDrag>"
+ when "\xfd\x34"; "<RightRelease>"
+ #when "\xfd\x35"; "KE_IGNORE"
+ #when "\xfd\x36"; "KE_TAB"
+ #when "\xfd\x37"; "KE_S_TAB_OLD"
+ #when "\xfd\x38"; "KE_SNIFF"
+ #when "\xfd\x39"; "KE_XF1"
+ #when "\xfd\x3a"; "KE_XF2"
+ #when "\xfd\x3b"; "KE_XF3"
+ #when "\xfd\x3c"; "KE_XF4"
+ #when "\xfd\x3d"; "KE_XEND"
+ #when "\xfd\x3e"; "KE_ZEND"
+ #when "\xfd\x3f"; "KE_XHOME"
+ #when "\xfd\x40"; "KE_ZHOME"
+ #when "\xfd\x41"; "KE_XUP"
+ #when "\xfd\x42"; "KE_XDOWN"
+ #when "\xfd\x43"; "KE_XLEFT"
+ #when "\xfd\x44"; "KE_XRIGHT"
+ #when "\xfd\x45"; "KE_LEFTMOUSE_NM"
+ #when "\xfd\x46"; "KE_LEFTRELEASE_NM"
+ #when "\xfd\x47"; "KE_S_XF1"
+ #when "\xfd\x48"; "KE_S_XF2"
+ #when "\xfd\x49"; "KE_S_XF3"
+ #when "\xfd\x4a"; "KE_S_XF4"
+ when "\xfd\x4b"; "<MouseDown>"
+ when "\xfd\x4c"; "<MouseUp>"
+ when "\xfd\x4d"; "<MouseLeft>"
+ when "\xfd\x4e"; "<MouseRight>"
+ #when "\xfd\x4f"; "KE_KINS"
+ #when "\xfd\x50"; "KE_KDEL"
+ #when "\xfd\x51"; "KE_CSI"
+ #when "\xfd\x52"; "KE_SNR"
+ #when "\xfd\x53"; "KE_PLUG"
+ #when "\xfd\x54"; "KE_CMDWIN"
+ when "\xfd\x55"; "<C-Left>"
+ when "\xfd\x56"; "<C-Right>"
+ when "\xfd\x57"; "<C-Home>"
+ when "\xfd\x58"; "<C-End>"
+ #when "\xfd\x59"; "KE_X1MOUSE"
+ #when "\xfd\x5a"; "KE_X1DRAG"
+ #when "\xfd\x5b"; "KE_X1RELEASE"
+ #when "\xfd\x5c"; "KE_X2MOUSE"
+ #when "\xfd\x5d"; "KE_X2DRAG"
+ #when "\xfd\x5e"; "KE_X2RELEASE"
+ #when "\xfd\x5f"; "KE_DROP"
+ #when "\xfd\x5e"; "KE_CURSORHOLD"
+ #when "\xfd\x61"; "KE_NOP"
+ #when "\xfd\x62"; "FOCUS_GAINED"
+ #when "\xfd\x63"; "FOCUS_LOST"
+
else
#puts "Unknown Vim code: #{code.inspect}"
'<%02x-%02x>' % code.unpack('CC')

0 comments on commit c833236

Please sign in to comment.
Something went wrong with that request. Please try again.