Liking cljdoc? Tell your friends :D

charm.input.mouse

Mouse event parsing for terminal input.

Supports:

  • X10 mouse encoding (CSI M followed by 3 bytes)
  • SGR mouse encoding (CSI < params M/m)
Mouse event parsing for terminal input.

Supports:
- X10 mouse encoding (CSI M followed by 3 bytes)
- SGR mouse encoding (CSI < params M/m)
raw docstring

action-motionclj

source

action-pressclj

source

action-releaseclj

source

button-backclj

source

button-extra-10clj

source

button-extra-11clj

source

button-forwardclj

source

button-leftclj

source

button-middleclj

source

button-noneclj

source

button-releaseclj

source

button-rightclj

source

button-wheel-downclj

source

button-wheel-leftclj

source

button-wheel-rightclj

source

button-wheel-upclj

source

click?clj

(click? event)

Check if a mouse event is a click (press action).

Check if a mouse event is a click (press action).
sourceraw docstring

left-click?clj

(left-click? event)

Check if a mouse event is a left click.

Check if a mouse event is a left click.
sourceraw docstring

middle-click?clj

(middle-click? event)

Check if a mouse event is a middle click.

Check if a mouse event is a middle click.
sourceraw docstring

motion?clj

(motion? event)

Check if a mouse event is motion.

Check if a mouse event is motion.
sourceraw docstring

mouse-event?clj

(mouse-event? event)

Check if an event is a mouse event.

Check if an event is a mouse event.
sourceraw docstring

parse-sgr-buttonclj

(parse-sgr-button code)

Parse the button code from SGR mouse encoding.

Parse the button code from SGR mouse encoding.
sourceraw docstring

parse-sgr-mouseclj

(parse-sgr-mouse s)

Parse an SGR mouse sequence string. Input: full sequence including CSI Returns mouse event map or nil.

Parse an SGR mouse sequence string.
Input: full sequence including CSI
Returns mouse event map or nil.
sourceraw docstring

parse-x10-buttonclj

(parse-x10-button b)

Parse the button byte from X10 mouse encoding. Returns {:button int :shift bool :alt bool :ctrl bool :motion bool}

Parse the button byte from X10 mouse encoding.
Returns {:button int :shift bool :alt bool :ctrl bool :motion bool}
sourceraw docstring

parse-x10-mouseclj

(parse-x10-mouse b1 b2 b3)

Parse an X10 mouse sequence. Input: 3 bytes after 'CSI M' (button, x+32, y+32) Returns mouse event map or nil.

Parse an X10 mouse sequence.
Input: 3 bytes after 'CSI M' (button, x+32, y+32)
Returns mouse event map or nil.
sourceraw docstring

release?clj

(release? event)

Check if a mouse event is a release.

Check if a mouse event is a release.
sourceraw docstring

right-click?clj

(right-click? event)

Check if a mouse event is a right click.

Check if a mouse event is a right click.
sourceraw docstring

wheel?clj

(wheel? event)

Check if a mouse event is a wheel event.

Check if a mouse event is a wheel event.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close