class X11::KeyEvent
- X11::KeyEvent
- X11::WindowEvent
- X11::Event
- Reference
- Object
Overview
Wrapper from X11::C::X::KeyEvent
structure.
Defined in:
x11/key_event.crConstructors
Instance Method Summary
- #display : Display
- #display=(display : Display)
- #keycode : UInt32
- #keycode=(keycode : UInt32)
-
#lookup_keysym(index : Int32) : X11::C::KeySym
Returns the KeySym from the list that corresponds to the
#keycode
member -
#lookup_string : NamedTuple(string: String, keysym: KeySym)
Translates key event to a string and a keysym.
- #press? : Bool
- #release? : Bool
- #root : X11::C::Window
- #root=(root : X11::C::Window)
- #same_screen : Bool
- #same_screen=(same_screen : Bool)
- #send_event : Bool
- #send_event=(send_event : Bool)
- #serial : UInt64
- #serial=(serial : UInt64)
- #state : UInt32
- #state=(state : UInt32)
- #sub_window : X11::C::Window
- #sub_window=(sub_window : X11::C::Window)
- #time : X11::C::Time
- #time=(time : X11::C::Time)
- #to_unsafe : X11::C::X::PKeyEvent
- #to_x : X11::C::X::KeyEvent
- #type : Int32
- #type=(type : Int32)
- #window : X11::C::Window
- #window=(window : X11::C::Window)
- #x : Int32
- #x=(x : Int32)
- #x_root : Int32
- #x_root=(x_root : Int32)
- #y : Int32
- #y=(y : Int32)
- #y_root : Int32
- #y_root=(y_root : Int32)
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
Instance Method Detail
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
.
Translates key event to a string and a keysym.