1 /* guile-irrlicht --- GNU Guile bindings for Irrlicht Engine
3 Copyright (C) 2020 Javier Sancho <jsf@jsancho.org>
5 This file is part of guile-irrlicht.
7 guile-irrlicht is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as
9 published by the Free Software Foundation; either version 3 of the
10 License, or (at your option) any later version.
12 guile-irrlicht is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with guile-irrlicht. If not, see
19 <http://www.gnu.org/licenses/>.
22 #include <irrlicht/irrlicht.h>
28 scm_from_key_code (EKEY_CODE key_code)
33 return scm_from_utf8_symbol ("lbutton");
37 return scm_from_utf8_symbol ("rbutton");
41 return scm_from_utf8_symbol ("cancel");
45 return scm_from_utf8_symbol ("mbutton");
49 return scm_from_utf8_symbol ("xbutton1");
53 return scm_from_utf8_symbol ("xbutton2");
57 return scm_from_utf8_symbol ("back");
61 return scm_from_utf8_symbol ("tab");
65 return scm_from_utf8_symbol ("clear");
69 return scm_from_utf8_symbol ("return");
73 return scm_from_utf8_symbol ("shift");
77 return scm_from_utf8_symbol ("control");
81 return scm_from_utf8_symbol ("menu");
85 return scm_from_utf8_symbol ("pause");
89 return scm_from_utf8_symbol ("capital");
93 return scm_from_utf8_symbol ("kana");
97 return scm_from_utf8_symbol ("junja");
101 return scm_from_utf8_symbol ("final");
105 return scm_from_utf8_symbol ("hanja");
109 return scm_from_utf8_symbol ("escape");
113 return scm_from_utf8_symbol ("convert");
117 return scm_from_utf8_symbol ("nonconvert");
121 return scm_from_utf8_symbol ("accept");
125 return scm_from_utf8_symbol ("modechange");
129 return scm_from_utf8_symbol ("space");
133 return scm_from_utf8_symbol ("prior");
137 return scm_from_utf8_symbol ("next");
141 return scm_from_utf8_symbol ("end");
145 return scm_from_utf8_symbol ("home");
149 return scm_from_utf8_symbol ("left");
153 return scm_from_utf8_symbol ("up");
157 return scm_from_utf8_symbol ("right");
161 return scm_from_utf8_symbol ("down");
165 return scm_from_utf8_symbol ("select");
169 return scm_from_utf8_symbol ("print");
173 return scm_from_utf8_symbol ("execut");
177 return scm_from_utf8_symbol ("snapshot");
181 return scm_from_utf8_symbol ("insert");
185 return scm_from_utf8_symbol ("delete");
189 return scm_from_utf8_symbol ("help");
193 return scm_from_utf8_symbol ("key-0");
197 return scm_from_utf8_symbol ("key-1");
201 return scm_from_utf8_symbol ("key-2");
205 return scm_from_utf8_symbol ("key-3");
209 return scm_from_utf8_symbol ("key-4");
213 return scm_from_utf8_symbol ("key-5");
217 return scm_from_utf8_symbol ("key-6");
221 return scm_from_utf8_symbol ("key-7");
225 return scm_from_utf8_symbol ("key-8");
229 return scm_from_utf8_symbol ("key-9");
233 return scm_from_utf8_symbol ("key-a");
237 return scm_from_utf8_symbol ("key-b");
241 return scm_from_utf8_symbol ("key-c");
245 return scm_from_utf8_symbol ("key-d");
249 return scm_from_utf8_symbol ("key-e");
253 return scm_from_utf8_symbol ("key-f");
257 return scm_from_utf8_symbol ("key-g");
261 return scm_from_utf8_symbol ("key-h");
265 return scm_from_utf8_symbol ("key-i");
269 return scm_from_utf8_symbol ("key-j");
273 return scm_from_utf8_symbol ("key-k");
277 return scm_from_utf8_symbol ("key-l");
281 return scm_from_utf8_symbol ("key-m");
285 return scm_from_utf8_symbol ("key-n");
289 return scm_from_utf8_symbol ("key-o");
293 return scm_from_utf8_symbol ("key-p");
297 return scm_from_utf8_symbol ("key-q");
301 return scm_from_utf8_symbol ("key-r");
305 return scm_from_utf8_symbol ("key-s");
309 return scm_from_utf8_symbol ("key-t");
313 return scm_from_utf8_symbol ("key-u");
317 return scm_from_utf8_symbol ("key-v");
321 return scm_from_utf8_symbol ("key-w");
325 return scm_from_utf8_symbol ("key-x");
329 return scm_from_utf8_symbol ("key-y");
333 return scm_from_utf8_symbol ("key-z");
337 return scm_from_utf8_symbol ("lwin");
341 return scm_from_utf8_symbol ("rwin");
345 return scm_from_utf8_symbol ("apps");
349 return scm_from_utf8_symbol ("sleep");
353 return scm_from_utf8_symbol ("numpad0");
357 return scm_from_utf8_symbol ("numpad1");
361 return scm_from_utf8_symbol ("numpad2");
365 return scm_from_utf8_symbol ("numpad3");
369 return scm_from_utf8_symbol ("numpad4");
373 return scm_from_utf8_symbol ("numpad5");
377 return scm_from_utf8_symbol ("numpad6");
381 return scm_from_utf8_symbol ("numpad7");
385 return scm_from_utf8_symbol ("numpad8");
389 return scm_from_utf8_symbol ("numpad9");
393 return scm_from_utf8_symbol ("multiply");
397 return scm_from_utf8_symbol ("add");
401 return scm_from_utf8_symbol ("separator");
405 return scm_from_utf8_symbol ("subtract");
409 return scm_from_utf8_symbol ("decimal");
413 return scm_from_utf8_symbol ("divide");
417 return scm_from_utf8_symbol ("f1");
421 return scm_from_utf8_symbol ("f2");
425 return scm_from_utf8_symbol ("f3");
429 return scm_from_utf8_symbol ("f4");
433 return scm_from_utf8_symbol ("f5");
437 return scm_from_utf8_symbol ("f6");
441 return scm_from_utf8_symbol ("f7");
445 return scm_from_utf8_symbol ("f8");
449 return scm_from_utf8_symbol ("f9");
453 return scm_from_utf8_symbol ("f10");
457 return scm_from_utf8_symbol ("f11");
461 return scm_from_utf8_symbol ("f12");
465 return scm_from_utf8_symbol ("f13");
469 return scm_from_utf8_symbol ("f14");
473 return scm_from_utf8_symbol ("f15");
477 return scm_from_utf8_symbol ("f16");
481 return scm_from_utf8_symbol ("f17");
485 return scm_from_utf8_symbol ("f18");
489 return scm_from_utf8_symbol ("f19");
493 return scm_from_utf8_symbol ("f20");
497 return scm_from_utf8_symbol ("f21");
501 return scm_from_utf8_symbol ("f22");
505 return scm_from_utf8_symbol ("f23");
509 return scm_from_utf8_symbol ("f24");
513 return scm_from_utf8_symbol ("numlock");
517 return scm_from_utf8_symbol ("scroll");
521 return scm_from_utf8_symbol ("lshift");
525 return scm_from_utf8_symbol ("rshift");
529 return scm_from_utf8_symbol ("lcontrol");
533 return scm_from_utf8_symbol ("rcontrol");
537 return scm_from_utf8_symbol ("lmenu");
541 return scm_from_utf8_symbol ("rmenu");
545 return scm_from_utf8_symbol ("oem-1");
549 return scm_from_utf8_symbol ("plus");
553 return scm_from_utf8_symbol ("comma");
557 return scm_from_utf8_symbol ("minus");
561 return scm_from_utf8_symbol ("period");
565 return scm_from_utf8_symbol ("oem-2");
569 return scm_from_utf8_symbol ("oem-3");
573 return scm_from_utf8_symbol ("oem-4");
577 return scm_from_utf8_symbol ("oem-5");
581 return scm_from_utf8_symbol ("oem-6");
585 return scm_from_utf8_symbol ("oem-7");
589 return scm_from_utf8_symbol ("oem-8");
593 return scm_from_utf8_symbol ("oem-ax");
597 return scm_from_utf8_symbol ("oem-102");
601 return scm_from_utf8_symbol ("attn");
605 return scm_from_utf8_symbol ("crsel");
609 return scm_from_utf8_symbol ("exsel");
613 return scm_from_utf8_symbol ("ereof");
617 return scm_from_utf8_symbol ("play");
621 return scm_from_utf8_symbol ("zoom");
625 return scm_from_utf8_symbol ("pa1");
629 return scm_from_utf8_symbol ("oem-clear");
633 SCM code = scm_from_uint (key_code);
634 scm_error (scm_arg_type_key, NULL, "Wrong key code: ~S",
635 scm_list_1 (code), scm_list_1 (code));