Skip to main content
Module

x/tui/mod.ts>MousePress

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
interface MousePress
implements Omit<KeyPress, "key">
Re-export
import { type MousePress } from "https://deno.land/x/tui@1.3.3/mod.ts";

Interface defining key press issued to stdin using a mouse

Properties

key: "mouse"

Mouse key id

x: number

Column on which mouse was when action was taken

y: number

Row on which mouse was when action was taken

button:
| 0
| 1
| 2
| undefined

Mouse button that has been used

  • 0 - Left
  • 1 - Middle
  • 2 - Right
release: boolean

Whether mouse button has been released

drag: boolean

Whether mouse cursor is dragged

scroll: 1 | 0 | -1

Whether user scroll

  • 1 - Scrolls downwards
  • 0 - Doesn't scroll
  • -1 - Scrolls upwards)