Keyboard macros: Difference between revisions
Content added Content deleted
No edit summary |
(Adds Clojure solution) |
||
Line 126: | Line 126: | ||
return EXIT_SUCCESS; |
return EXIT_SUCCESS; |
||
}</lang> |
}</lang> |
||
=={{header|Clojure}}== |
|||
{{libheader|seesaw}} |
|||
The following example is at application level, printing out what key was pressed: |
|||
<lang clojure> |
|||
(ns hello-seesaw.core |
|||
(:use seesaw.core)) |
|||
(defn -main [& args] |
|||
(invoke-later |
|||
(-> (frame |
|||
:listen [:key-pressed (fn [e] (println (.getKeyChar e) " key pressed"))] |
|||
:on-close :exit) |
|||
pack! |
|||
show!))) |
|||
</lang> |
|||
=={{header|HicEst}}== |
=={{header|HicEst}}== |