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>
30 scm_from_key_code (EKEY_CODE key_code)
35 return scm_from_utf8_symbol ("lbutton");
39 return scm_from_utf8_symbol ("rbutton");
43 return scm_from_utf8_symbol ("cancel");
47 return scm_from_utf8_symbol ("mbutton");
51 return scm_from_utf8_symbol ("xbutton1");
55 return scm_from_utf8_symbol ("xbutton2");
59 return scm_from_utf8_symbol ("back");
63 return scm_from_utf8_symbol ("tab");
67 return scm_from_utf8_symbol ("clear");
71 return scm_from_utf8_symbol ("return");
75 return scm_from_utf8_symbol ("shift");
79 return scm_from_utf8_symbol ("control");
83 return scm_from_utf8_symbol ("menu");
87 return scm_from_utf8_symbol ("pause");
91 return scm_from_utf8_symbol ("capital");
95 return scm_from_utf8_symbol ("kana");
99 return scm_from_utf8_symbol ("junja");
103 return scm_from_utf8_symbol ("final");
107 return scm_from_utf8_symbol ("hanja");
111 return scm_from_utf8_symbol ("escape");
115 return scm_from_utf8_symbol ("convert");
119 return scm_from_utf8_symbol ("nonconvert");
123 return scm_from_utf8_symbol ("accept");
127 return scm_from_utf8_symbol ("modechange");
131 return scm_from_utf8_symbol ("space");
135 return scm_from_utf8_symbol ("prior");
139 return scm_from_utf8_symbol ("next");
143 return scm_from_utf8_symbol ("end");
147 return scm_from_utf8_symbol ("home");
151 return scm_from_utf8_symbol ("left");
155 return scm_from_utf8_symbol ("up");
159 return scm_from_utf8_symbol ("right");
163 return scm_from_utf8_symbol ("down");
167 return scm_from_utf8_symbol ("select");
171 return scm_from_utf8_symbol ("print");
175 return scm_from_utf8_symbol ("execut");
179 return scm_from_utf8_symbol ("snapshot");
183 return scm_from_utf8_symbol ("insert");
187 return scm_from_utf8_symbol ("delete");
191 return scm_from_utf8_symbol ("help");
195 return scm_from_utf8_symbol ("key-0");
199 return scm_from_utf8_symbol ("key-1");
203 return scm_from_utf8_symbol ("key-2");
207 return scm_from_utf8_symbol ("key-3");
211 return scm_from_utf8_symbol ("key-4");
215 return scm_from_utf8_symbol ("key-5");
219 return scm_from_utf8_symbol ("key-6");
223 return scm_from_utf8_symbol ("key-7");
227 return scm_from_utf8_symbol ("key-8");
231 return scm_from_utf8_symbol ("key-9");
235 return scm_from_utf8_symbol ("key-a");
239 return scm_from_utf8_symbol ("key-b");
243 return scm_from_utf8_symbol ("key-c");
247 return scm_from_utf8_symbol ("key-d");
251 return scm_from_utf8_symbol ("key-e");
255 return scm_from_utf8_symbol ("key-f");
259 return scm_from_utf8_symbol ("key-g");
263 return scm_from_utf8_symbol ("key-h");
267 return scm_from_utf8_symbol ("key-i");
271 return scm_from_utf8_symbol ("key-j");
275 return scm_from_utf8_symbol ("key-k");
279 return scm_from_utf8_symbol ("key-l");
283 return scm_from_utf8_symbol ("key-m");
287 return scm_from_utf8_symbol ("key-n");
291 return scm_from_utf8_symbol ("key-o");
295 return scm_from_utf8_symbol ("key-p");
299 return scm_from_utf8_symbol ("key-q");
303 return scm_from_utf8_symbol ("key-r");
307 return scm_from_utf8_symbol ("key-s");
311 return scm_from_utf8_symbol ("key-t");
315 return scm_from_utf8_symbol ("key-u");
319 return scm_from_utf8_symbol ("key-v");
323 return scm_from_utf8_symbol ("key-w");
327 return scm_from_utf8_symbol ("key-x");
331 return scm_from_utf8_symbol ("key-y");
335 return scm_from_utf8_symbol ("key-z");
339 return scm_from_utf8_symbol ("lwin");
343 return scm_from_utf8_symbol ("rwin");
347 return scm_from_utf8_symbol ("apps");
351 return scm_from_utf8_symbol ("sleep");
355 return scm_from_utf8_symbol ("numpad0");
359 return scm_from_utf8_symbol ("numpad1");
363 return scm_from_utf8_symbol ("numpad2");
367 return scm_from_utf8_symbol ("numpad3");
371 return scm_from_utf8_symbol ("numpad4");
375 return scm_from_utf8_symbol ("numpad5");
379 return scm_from_utf8_symbol ("numpad6");
383 return scm_from_utf8_symbol ("numpad7");
387 return scm_from_utf8_symbol ("numpad8");
391 return scm_from_utf8_symbol ("numpad9");
395 return scm_from_utf8_symbol ("multiply");
399 return scm_from_utf8_symbol ("add");
403 return scm_from_utf8_symbol ("separator");
407 return scm_from_utf8_symbol ("subtract");
411 return scm_from_utf8_symbol ("decimal");
415 return scm_from_utf8_symbol ("divide");
419 return scm_from_utf8_symbol ("f1");
423 return scm_from_utf8_symbol ("f2");
427 return scm_from_utf8_symbol ("f3");
431 return scm_from_utf8_symbol ("f4");
435 return scm_from_utf8_symbol ("f5");
439 return scm_from_utf8_symbol ("f6");
443 return scm_from_utf8_symbol ("f7");
447 return scm_from_utf8_symbol ("f8");
451 return scm_from_utf8_symbol ("f9");
455 return scm_from_utf8_symbol ("f10");
459 return scm_from_utf8_symbol ("f11");
463 return scm_from_utf8_symbol ("f12");
467 return scm_from_utf8_symbol ("f13");
471 return scm_from_utf8_symbol ("f14");
475 return scm_from_utf8_symbol ("f15");
479 return scm_from_utf8_symbol ("f16");
483 return scm_from_utf8_symbol ("f17");
487 return scm_from_utf8_symbol ("f18");
491 return scm_from_utf8_symbol ("f19");
495 return scm_from_utf8_symbol ("f20");
499 return scm_from_utf8_symbol ("f21");
503 return scm_from_utf8_symbol ("f22");
507 return scm_from_utf8_symbol ("f23");
511 return scm_from_utf8_symbol ("f24");
515 return scm_from_utf8_symbol ("numlock");
519 return scm_from_utf8_symbol ("scroll");
523 return scm_from_utf8_symbol ("lshift");
527 return scm_from_utf8_symbol ("rshift");
531 return scm_from_utf8_symbol ("lcontrol");
535 return scm_from_utf8_symbol ("rcontrol");
539 return scm_from_utf8_symbol ("lmenu");
543 return scm_from_utf8_symbol ("rmenu");
547 return scm_from_utf8_symbol ("oem-1");
551 return scm_from_utf8_symbol ("plus");
555 return scm_from_utf8_symbol ("comma");
559 return scm_from_utf8_symbol ("minus");
563 return scm_from_utf8_symbol ("period");
567 return scm_from_utf8_symbol ("oem-2");
571 return scm_from_utf8_symbol ("oem-3");
575 return scm_from_utf8_symbol ("oem-4");
579 return scm_from_utf8_symbol ("oem-5");
583 return scm_from_utf8_symbol ("oem-6");
587 return scm_from_utf8_symbol ("oem-7");
591 return scm_from_utf8_symbol ("oem-8");
595 return scm_from_utf8_symbol ("oem-ax");
599 return scm_from_utf8_symbol ("oem-102");
603 return scm_from_utf8_symbol ("attn");
607 return scm_from_utf8_symbol ("crsel");
611 return scm_from_utf8_symbol ("exsel");
615 return scm_from_utf8_symbol ("ereof");
619 return scm_from_utf8_symbol ("play");
623 return scm_from_utf8_symbol ("zoom");
627 return scm_from_utf8_symbol ("pa1");
631 return scm_from_utf8_symbol ("oem-clear");
635 SCM code = scm_from_uint (key_code);
636 scm_error (scm_arg_type_key, NULL, "Wrong key code: ~S",
637 scm_list_1 (code), scm_list_1 (code));