3 build-input🔗ℹ

procedure

(build-input [#:key on-key    
  #:text on-text    
  #:paste on-paste    
  #:mouse on-mouse    
  #:resize on-resize    
  #:null on-null    
  #:any on-any    
  #:tab on-tab    
  #:backtab on-backtab    
  #:space on-space    
  #:enter on-enter    
  #:backspace on-backspace    
  #:escape on-escape    
  #:up on-up    
  #:down on-down    
  #:left on-left    
  #:right on-right    
  #:delete on-delete    
  #:insert on-insert    
  #:home on-home    
  #:end on-end    
  #:pageup on-pageup    
  #:pagedown on-pagedown    
  #:key-release on-key-release    
  #:key-repeat on-key-repeat]) → (-> event? any)
  on-key : (or/c (-> (or/c char? symbol?) mods? any) #f) = #f
  on-text : (or/c (-> string? any) #f) = #f
  on-paste : (or/c (-> bytes? any) #f) = #f
  on-mouse : (or/c (-> symbol? (or/c symbol? #f) exact-nonnegative-integer? exact-nonnegative-integer? mods? any) #f)
   = #f
  on-resize : (or/c (-> exact-positive-integer? exact-positive-integer? any) #f)
   = #f
  on-null : (or/c (-> any) #f) = #f
  on-any : (or/c (-> event? any) #f) = #f
  on-tab : (or/c (-> any) #f) = #f
  on-backtab : (or/c (-> any) #f) = #f
  on-space : (or/c (-> any) #f) = #f
  on-enter : (or/c (-> any) #f) = #f
  on-backspace : (or/c (-> any) #f) = #f
  on-escape : (or/c (-> any) #f) = #f
  on-up : (or/c (-> any) #f) = #f
  on-down : (or/c (-> any) #f) = #f
  on-left : (or/c (-> any) #f) = #f
  on-right : (or/c (-> any) #f) = #f
  on-delete : (or/c (-> any) #f) = #f
  on-insert : (or/c (-> any) #f) = #f
  on-home : (or/c (-> any) #f) = #f
  on-end : (or/c (-> any) #f) = #f
  on-pageup : (or/c (-> any) #f) = #f
  on-pagedown : (or/c (-> any) #f) = #f
  on-key-release : (or/c (-> (or/c char? symbol?) mods? any) #f)
   = #f
  on-key-repeat : (or/c (-> (or/c char? symbol?) mods? any) #f)
   = #f
The tui/kitty event handler builder. It accepts every keyword of the base build-input plus #:key-release and #:key-repeat, and dispatches events the same way otherwise.

Release events are not delivered to #:key by default (they go to #:key-release when provided, otherwise to #:any). Repeat events go to #:key-repeat when provided, otherwise they are treated as presses. Super/Hyper/Meta are routed to #:key instead of being treated as text, while CapsLock/NumLock do not block text input. Multi-codepoint associated text (flag 16) is delivered to #:text.