Add homepage and bug tracker
Add test suite
Revise README, defsystem, fix misplaced linux docstring
This little library is a port of all constants found in input-event-codes.h
,
an event code header file found on both
Linux
and
FreeBSD.
(require :input-event-codes)
;; Print all constants and their values
(do-external-symbols (sym :input-event-codes)
(format t "~S = ~D" sym (symbol-value sym)))
;; Convoluted example...
(defun handle-button-event (code pressed-p)
(when (= btn input-event-codes:+btn-left+)
...))
There is currently only support for Linux and FreeBSD. The library uses trivial-features to conditionally load the appropriate constant set. If this or a similar header is found in other operating systems, please let me know and I will add them. :)
The Linux Kernel docs provides an outline over all the event code constants.
#xf
and #x10
respectively on FreeBSD,
but #x10
and #x11
respectively on Linux.These constants are available on Linux only: