# tui/px->cell Convert a pixel point in workspace space to cell coordinates (floored). ## Syntax
[tui/px->cell $x $y]
## Parameters - `$x` — pixel x - `$y` — pixel y ## Examples
set cell [apply "tui/px->cell" $mx $my]   # mouse pixels → @[col row]
set col [nth $cell 0]
## Returns Vector `@[col row]`. `nil` when fewer than two args are given, no workspace is attached (standalone `deft`), or the host's cell size is 0 (ANSI `retra` — mouse events there already arrive in cells). ## Notes The registered symbol name contains `>`, which the current lexer reads as the comparison operator — a literal `[tui/px->cell …]` call is parsed as an expression over `>` and fails with `undefined symbol: >`. Call it by name until that changes: `[apply "tui/px->cell" $x $y]`. ## See Also `tui/cell->px`, `tui/cell-size`, `tui/hover-cell`