Paste: This takes 3 minutes to compile
Author: | gifti |
Mode: | factor |
Date: | Fri, 8 Mar 2024 18:54:52 |
Plain Text |
USING: combinators formatting io kernel ;
IN: minimal-example
: parse-input ( n buffer -- )
swap {
{ 1 [ "Ctrl-A" ] }
{ 2 [ "Ctrl-B" ] }
{ 3 [ "Ctrl-C" ] }
{ 5 [ "Ctrl-E" ] }
{ 6 [ "Ctrl-F" ] }
{ 7 [ "Ctrl-G" ] }
{ 8 [ "Ctrl-H/Ctrl-Backspace" ] }
{ 9 [ "Ctrl-I/Tab" ] }
{ 10 [ "Ctrl-J/Return" ] }
{ 11 [ "Ctrl-K" ] }
{ 12 [ "Ctrl-L" ] }
{ 13 [ "Ctrl-M" ] }
{ 14 [ "Ctrl-N" ] }
{ 15 [ "Ctrl-O" ] }
{ 16 [ "Ctrl-P" ] }
{ 17 [ "Ctrl-Q" ] }
{ 18 [ "Ctrl-R" ] }
{ 19 [ "Ctrl-S" ] }
{ 20 [ "Ctrl-T" ] }
{ 21 [ "Ctrl-U" ] }
{ 22 [ "Ctrl-V" ] }
{ 23 [ "Ctrl-W" ] }
{ 24 [ "Ctrl-X" ] }
{ 25 [ "Ctrl-Y" ] }
{ 26 [ "Ctrl-Z" ] }
{ 258 [ "Down" ] }
{ 259 [ "Up" ] }
{ 260 [ "Left" ] }
{ 261 [ "Right" ] }
{ 262 [ "Home" ] }
{ 263 [ "Backspace" ] }
{ 265 [ "F1" ] }
{ 266 [ "F2" ] }
{ 267 [ "F3" ] }
{ 268 [ "F4" ] }
{ 269 [ "F5" ] }
{ 270 [ "F6" ] }
{ 271 [ "F7" ] }
{ 272 [ "F8" ] }
{ 273 [ "F9" ] }
{ 274 [ "F10" ] }
{ 275 [ "F11" ] }
{ 276 [ "F12" ] }
{ 281 [ "Shift-F5" ] }
{ 282 [ "Shift-F6" ] }
{ 283 [ "Shift-F7" ] }
{ 284 [ "Shift-F8" ] }
{ 285 [ "Shift-F9" ] }
{ 286 [ "Shift-F10" ] }
{ 287 [ "Shift-F11" ] }
{ 288 [ "Shift-F12" ] }
{ 293 [ "Ctrl-F5" ] }
{ 294 [ "Ctrl-F6" ] }
{ 295 [ "Ctrl-F7" ] }
{ 296 [ "Ctrl-F8" ] }
{ 297 [ "Ctrl-F9" ] }
{ 298 [ "Ctrl-F10" ] }
{ 299 [ "Ctrl-F11" ] }
{ 300 [ "Ctrl-F12" ] }
{ 305 [ "Ctrl-Shift-F5" ] }
{ 306 [ "Ctrl-Shift-F6" ] }
{ 307 [ "Ctrl-Shift-F7" ] }
{ 308 [ "Ctrl-Shift-F8" ] }
{ 309 [ "Ctrl-Shift-F9" ] }
{ 310 [ "Ctrl-Shift-F10" ] }
{ 311 [ "Ctrl-Shift-F11" ] }
{ 312 [ "Ctrl-Shift-F12" ] }
{ 317 [ "Alt-F5" ] }
{ 318 [ "Alt-F6" ] }
{ 319 [ "Alt-F7" ] }
{ 320 [ "Alt-F8" ] }
{ 321 [ "Alt-F9" ] }
{ 322 [ "Alt-F10" ] }
{ 323 [ "Alt-F11" ] }
{ 324 [ "Alt-F12" ] }
{ 330 [ "Delete" ] }
{ 331 [ "Insert" ] }
{ 336 [ "Shift-Up" ] }
{ 337 [ "Shift-Down" ] }
{ 338 [ "PgDn" ] }
{ 339 [ "PgUp" ] }
{ 343 [ "Shift-Return" ] }
{ 360 [ "End" ] }
{ 383 [ "Shift-Delete" ] }
{ 386 [ "Shift-End" ] }
{ 391 [ "Shift-Home" ] }
{ 392 [ "Shift-Insert" ] }
{ 393 [ "Shift-Left" ] }
{ 396 [ "Shift-PgDn" ] }
{ 398 [ "Shift-PgUp" ] }
{ 402 [ "Shift-Right" ] }
{ 410 [ "Terminal-Resize" ] }
{ 524 [ "Alt-Delete" ] }
{ 526 [ "Ctrl-Delete" ] }
{ 527 [ "Ctrl-Shift-Delete" ] }
{ 530 [ "Alt-Down" ] }
{ 531 [ "Alt-Shift-Down" ] }
{ 532 [ "Ctrl-Down" ] }
{ 533 [ "Ctrl-Shift-Down" ] }
{ 534 [ "Ctrl-Alt-Down" ] }
{ 535 [ "Alt-End" ] }
{ 536 [ "Alt-Shift-End" ] }
{ 537 [ "Ctrl-End" ] }
{ 538 [ "Ctrl-Shift-End" ] }
{ 540 [ "Alt-Home/Alt-Backspace" ] }
{ 541 [ "Alt-Shift-Home" ] }
{ 542 [ "Ctrl-Home" ] }
{ 543 [ "Ctrl-Shift-Home" ] }
{ 544 [ "Ctrl-Alt-Home" ] }
{ 545 [ "Alt-Insert" ] }
{ 546 [ "Alt-Shift-Insert" ] }
{ 547 [ "Ctrl-Insert" ] }
{ 550 [ "Alt-Left" ] }
{ 551 [ "Alt-Shift-Left" ] }
{ 552 [ "Ctrl-Left" ] }
{ 553 [ "Ctrl-Shift-Left" ] }
{ 554 [ "Ctrl-Alt-Left" ] }
{ 555 [ "Alt-PgDn" ] }
{ 556 [ "Alt-Shift-PgDn" ] }
{ 557 [ "Ctrl-PgDn" ] }
{ 560 [ "Alt-PgUp" ] }
{ 561 [ "Alt-Shift-PgUp" ] }
{ 562 [ "Ctrl-PgUp" ] }
{ 565 [ "Alt-Right" ] }
{ 566 [ "Alt-Shift-Right" ] }
{ 567 [ "Ctrl-Right" ] }
{ 568 [ "Ctrl-Shift-Right" ] }
{ 569 [ "Ctrl-Alt-Right" ] }
{ 571 [ "Alt-Up" ] }
{ 572 [ "Alt-Shift-Up" ] }
{ 573 [ "Ctrl-Up" ] }
{ 574 [ "Ctrl-Shift-Up" ] }
{ 575 [ "Ctrl-Alt-Up" ] }
{ 588 [ "Gain-Focus" ] }
{ 589 [ "Lose-Focus" ] }
[ "Unknown keycode: %d" sprintf ]
} case print drop ;
New Annotation