module Lime::Modules::Mouse

Overview

The mouse pointer of the system.

NOTE The default mouse event report mode is Mode::Off which won't report any mouse events. To set a mouse event report mode, use #mode=.

Extended Modules

Defined in:

lime/modules.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.extended #

Returns true if the mouse event report range is extended, otherwise false.


[View source]
def self.mode : Mode #

Returns the current mouse event report mode.


[View source]

Instance Method Detail

def extend(bool = true) #

Extends the mouse event report range if bool is true, otherwise resets the range.

The default X10 mouse protocol doesn't support mouse event reporting with x, y coordinates greater than 94. This extends the range to be greater than 94 by using the 1006 SGR (Select Graphic Rendition) mouse protocol.


[View source]
def get : Event | Nil #

Waits for input and returns Event if the input is a mouse event, nil if the input is not a mouse event or if .mode is Mode::Off.

NOTE Ctrl+C is caught by this method and will not be handled by the system.


[View source]
def mode=(mode : Mode) #

Sets the mouse event report mode to mode.


[View source]
def peek : Event | Nil #

Returns the mouse event happening in the moment this method is called as Event, nil if the input is not a mouse event or if .mode is Mode::Off.

NOTE Ctrl+C can be caught by this method and will not be handled by the system.


[View source]