diff mbox series

[bug#51912,2/2] gnu: Add cl-terminal-keypress.

Message ID PU1PR01MB2155E9B087A3D4DD98DC937C8D9A9@PU1PR01MB2155.apcprd01.prod.exchangelabs.com
State New
Headers show
Series gnu: Add cl-terminal-keypress. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Foo Chuan Wei Nov. 17, 2021, 5:46 a.m. UTC
* gnu/packages/lisp-xyz.scm (cl-terminal-keypress,
  ecl-terminal-keypress, sbcl-terminal-keypress): New variables.
---
 gnu/packages/lisp-xyz.scm | 42 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index b63c89012a..fbf1a0ac8e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -18750,6 +18750,48 @@  symbols: @code{with-raw-io}, @code{read-char}, and @code{read-line}.")
 (define-public ecl-trivial-raw-io
   (sbcl-package->ecl-package sbcl-trivial-raw-io))
 
+(define-public sbcl-terminal-keypress
+  (let ((commit "2ef48c045aa627229764b2aa393a83d392d93d08")
+        (revision "1"))
+    (package
+      (name "sbcl-terminal-keypress")
+      (version (git-version "0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/eudoxia0/terminal-keypress")
+               (commit commit)))
+         (file-name (git-file-name "cl-terminal-keypress" version))
+         (sha256
+          (base32 "11c4krpq5x55qkchx6ykcnb455ssb4r3jjywx3c3irfrkj733ybp"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       `(("alexandria" ,sbcl-alexandria)
+         ("trivial-raw-io" ,sbcl-trivial-raw-io)))
+      (native-inputs
+       `(("fiveam" ,sbcl-fiveam)))
+      (home-page "https://github.com/eudoxia0/terminal-keypress")
+      (synopsis "Read keyboard events in the terminal from Common Lisp")
+      (description
+       "This is a library for reading semi-raw user input from terminals.
+Semi-raw as in, we can't detect if the user pressed the @code{Control} key
+alone, and the function keys are a mystery.  What is supported, however, is:
+
+@itemize
+@item Regular characters
+@item Control+[key]
+@item Alt+[key]
+@item Control+Alt+[key]
+@end itemize")
+      (license license:expat))))
+
+(define-public cl-terminal-keypress
+  (sbcl-package->cl-source-package sbcl-terminal-keypress))
+
+(define-public ecl-terminal-keypress
+  (sbcl-package->ecl-package sbcl-terminal-keypress))
+
 (define-public sbcl-periodic-table
   (package
     (name "sbcl-periodic-table")