class X11::KeyEvent

Overview

Wrapper from X11::C::X::KeyEvent structure.

Defined in:

x11/key_event.cr

Constructors

Instance Method Summary

Instance methods inherited from class X11::WindowEvent

display : Display display, display=(display : Display) display=, window : X11::C::Window window, window=(window : X11::C::Window) window=

Instance methods inherited from class X11::Event

serial : UInt64 serial, serial=(serial : UInt64) serial=, type : Int32 type, type=(type : Int32) type=

Constructor methods inherited from class X11::Event

from_xevent(xevent : X11::C::X::Event) : Event from_xevent

Constructor Detail

def self.new(key_event : X11::C::X::PKeyEvent) #

[View source]
def self.new(event : X11::C::X::KeyEvent) #

[View source]
def self.new #

[View source]

Instance Method Detail

def display : Display #

[View source]
def display=(display : Display) #

[View source]
def keycode : UInt32 #

[View source]
def keycode=(keycode : UInt32) #

[View source]
def lookup_keysym(index : Int32) : X11::C::KeySym #

Returns the KeySym from the list that corresponds to the #keycode member

Arguments

  • index Specifies the index into the KeySyms list for the event's KeyCode.

Description

The #lookup_keysym function uses a given keyboard event and the index you specified to return the KeySym from the list that corresponds to the KeyCode member in the KeyPressedEvent or KeyReleasedEvent structure. If no KeySym is defined for the KeyCode of the event, lookup_leysym returns NoSymbol.

See also

#lookup_string, Display::rebind_keysym, MappingEvent::refresh_keyboard_mapping, ButtonEvent, MapEvent.


[View source]
def lookup_string : NamedTuple(string: String, keysym: KeySym) #

Translates key event to a string and a keysym.


[View source]
def press? : Bool #

[View source]
def release? : Bool #

[View source]
def root : X11::C::Window #

[View source]
def root=(root : X11::C::Window) #

[View source]
def same_screen : Bool #

[View source]
def same_screen=(same_screen : Bool) #

[View source]
def send_event : Bool #

[View source]
def send_event=(send_event : Bool) #

[View source]
def serial : UInt64 #

[View source]
def serial=(serial : UInt64) #

[View source]
def state : UInt32 #

[View source]
def state=(state : UInt32) #

[View source]
def sub_window : X11::C::Window #

[View source]
def sub_window=(sub_window : X11::C::Window) #

[View source]
def time : X11::C::Time #

[View source]
def time=(time : X11::C::Time) #

[View source]
def to_unsafe : X11::C::X::PKeyEvent #

[View source]
def to_x : X11::C::X::KeyEvent #

[View source]
def type : Int32 #

[View source]
def type=(type : Int32) #

[View source]
def window : X11::C::Window #

[View source]
def window=(window : X11::C::Window) #

[View source]
def x : Int32 #

[View source]
def x=(x : Int32) #

[View source]
def x_root : Int32 #

[View source]
def x_root=(x_root : Int32) #

[View source]
def y : Int32 #

[View source]
def y=(y : Int32) #

[View source]
def y_root : Int32 #

[View source]
def y_root=(y_root : Int32) #

[View source]