(.require
 [library
  [lux (.except)
   ["$" documentation]
   [data
    ["[0]" text (.only \n)
     ["%" \\format (.only format)]]
    [collection
     ["[0]" list (.use "[1]#[0]" monoid)]]]]]
 [\\library
  ["[0]" /]])

(def all/characters
  (List $.Documentation)
  (list ($.definition /.back_space)
        ($.definition /.enter)
        ($.definition /.shift)
        ($.definition /.control)
        ($.definition /.alt)
        ($.definition /.caps_lock)
        ($.definition /.escape)
        ($.definition /.space)
        ($.definition /.page_up)
        ($.definition /.page_down)
        ($.definition /.end)
        ($.definition /.home)
        ($.definition /.left)
        ($.definition /.up)
        ($.definition /.right)
        ($.definition /.down)
        ($.definition /.a)
        ($.definition /.b)
        ($.definition /.c)
        ($.definition /.d)
        ($.definition /.e)
        ($.definition /.f)
        ($.definition /.g)
        ($.definition /.h)
        ($.definition /.i)
        ($.definition /.j)
        ($.definition /.k)
        ($.definition /.l)
        ($.definition /.m)
        ($.definition /.n)
        ($.definition /.o)
        ($.definition /.p)
        ($.definition /.q)
        ($.definition /.r)
        ($.definition /.s)
        ($.definition /.t)
        ($.definition /.u)
        ($.definition /.v)
        ($.definition /.w)
        ($.definition /.x)
        ($.definition /.y)
        ($.definition /.z)
        ))

(def all/special
  (List $.Documentation)
  (list ($.definition /.num_pad_0)
        ($.definition /.num_pad_1)
        ($.definition /.num_pad_2)
        ($.definition /.num_pad_3)
        ($.definition /.num_pad_4)
        ($.definition /.num_pad_5)
        ($.definition /.num_pad_6)
        ($.definition /.num_pad_7)
        ($.definition /.num_pad_8)
        ($.definition /.num_pad_9)
        ($.definition /.delete)
        ($.definition /.num_lock)
        ($.definition /.scroll_lock)
        ($.definition /.print_screen)
        ($.definition /.insert)
        ($.definition /.windows)
        ($.definition /.f1)
        ($.definition /.f2)
        ($.definition /.f3)
        ($.definition /.f4)
        ($.definition /.f5)
        ($.definition /.f6)
        ($.definition /.f7)
        ($.definition /.f8)
        ($.definition /.f9)
        ($.definition /.f10)
        ($.definition /.f11)
        ($.definition /.f12)
        ($.definition /.f13)
        ($.definition /.f14)
        ($.definition /.f15)
        ($.definition /.f16)
        ($.definition /.f17)
        ($.definition /.f18)
        ($.definition /.f19)
        ($.definition /.f20)
        ($.definition /.f21)
        ($.definition /.f22)
        ($.definition /.f23)
        ($.definition /.f24)
        ($.definition /.release)
        ($.definition /.press)
        ))

(def .public documentation
  (List $.Documentation)
  (list.partial ($.module /._
                          "")

                ($.definition /.Key
                  "A key from a keyboard, identify by a numeric ID.")

                ($.definition /.Press
                  "A key-press for a key.")

                (all list#composite
                     ..all/characters
                     ..all/special
                     )
                ))
