CLX keyboard input, save character code
Posted: Thu Dec 15, 2011 11:43 pm
Hello all, my first post here,
To learn a little more of Common Lisp I have spent today trying to write a terminal emulator for Lisp using the CLX library. So far I have most of it working apart from the keyboard (somewhat important for a terminal). I have the :key-press event like:
(:key-press (key) (format t "Key: ~a~%" key))
But every time I press a button I get "Key: NIL" at the REPL, so I was wondering how I can store the character code or character-type generated from pressing a button on the keyboard?
Using SBCL 1.0.49 and FreeBSD
Any help would be greatly appreciated
E_Blackadder
To learn a little more of Common Lisp I have spent today trying to write a terminal emulator for Lisp using the CLX library. So far I have most of it working apart from the keyboard (somewhat important for a terminal). I have the :key-press event like:
(:key-press (key) (format t "Key: ~a~%" key))
But every time I press a button I get "Key: NIL" at the REPL, so I was wondering how I can store the character code or character-type generated from pressing a button on the keyboard?
Using SBCL 1.0.49 and FreeBSD
Any help would be greatly appreciated
E_Blackadder