Files
cell/docs/api/modules/input.md
2025-02-10 09:48:59 -06:00

89 lines
1.5 KiB
Markdown

# input
### mouse_show(show) <sub>function</sub>
Show or hide the mouse cursor. Pass true to show, false to hide.
**show**: Boolean. True to show, false to hide.
**Returns**: None
### mouse_lock(lock) <sub>function</sub>
Capture or release the mouse, confining it within the window if locked.
**lock**: Boolean. True to lock, false to unlock.
**Returns**: None
### cursor_set(cursor) <sub>function</sub>
Set the given cursor (created by os.make_cursor) as the active mouse cursor.
**cursor**: The cursor to set.
**Returns**: None
### keyname(keycode) <sub>function</sub>
Given a numeric keycode, return the corresponding key name (e.g., from SDL).
**keycode**: A numeric SDL keycode.
**Returns**: A string with the key name.
### keymod() <sub>function</sub>
Return an object describing the current modifier keys, e.g. {shift:true, ctrl:true}.
**Returns**: An object with boolean fields for each modifier key.
### mousestate() <sub>function</sub>
Return an object describing the current mouse state, including x,y coordinates
and booleans for pressed buttons (left, middle, right, x1, x2).
**Returns**: Object { x, y, left, middle, right, x1, x2 }
### mouse <sub>object</sub>
### keyboard <sub>object</sub>
### print_pawn_kbm(pawn) <sub>function</sub>
### procdown() <sub>function</sub>
### print_md_kbm(pawn) <sub>function</sub>
### has_bind(pawn, bind) <sub>function</sub>
### action <sub>object</sub>
### tabcomplete(val, list) <sub>function</sub>
### do_uncontrol(pawn) <sub>function</sub>
### player <sub>object</sub>