events
Graphics and Screen4.0 (8.x)Screen Graphics Subsystem Developer's GuideAPIProgrammingUtilities
Create a window manager connection to Screen and dump the events received as output to the console.
Syntax:
events [-display=display_id] [-pos=x,y] [-size=widthxheight]
Runs on:
QNX OS
Options:
- -display=display_id
-
Show the events on the display as specified by display_id.
You can specify display_id as one of the following:
- an integer that identifies the display
- an ID string that identifies the name of the display (id_string)
If you don't have any display subsections configured, or if you don't specify the display option, then events uses the default display.
- -pos=x,y
- Sets the x,y coordinates to show the window on the display. The default coordinate of 0,0 is used if this option isn't specified.
- -size=widthxheight
- Sets the size of the window. The default size is 64x64 if this option isn't specified.
Description:
The events binary is used to demonstrate how events are handled. The output from this binary also includes notifications when a window is created or destroyed. The window properties are dumped when a WINDOW_CREATE_EVENT is received. In the window created on the display, input events, such as from a pointer or keyboard, are received.
To run events:
- Ensure that screen is running.
- Run events from a shell.
Examples:
Run events in the background:
# events& -pos=10,10 -size=100x100 &
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00000000, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
If you run events, then run and then slay another application that uses screen, such as gles2-gears, you should see various events. For example:
# events &
[1] 880665
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00000000, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
#
# gles2-gears>/dev/null &
[2] 884762
# SCREEN_EVENT_CREATE(window=0x00110088, pid=884762, handle=0x00000000)
SCREEN_EVENT_PROPERTY(window=0x00110088, pname=SCREEN_PROPERTY_FORMAT,
value=SCREEN_FORMAT_RGB565)
SCREEN_EVENT_PROPERTY(window=0x00110088, pname=SCREEN_PROPERTY_USAGE, value=0x0020)
SCREEN_EVENT_PROPERTY(window=0x00110088, pname=SCREEN_PROPERTY_ID_STRING,
value=gles2-gears)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00000000, pname=84)
SCREEN_EVENT_POST(window=0x00110088, handle=0x00110088)
SCREEN_EVENT_PROPERTY(window=0x00110088, pname=154)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
#
# slay gles2-gears
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00000000, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
SCREEN_EVENT_CLOSE(window=0x00110088, handle=0x00110088)
If you run events, and then plug a mouse in, move the mouse, and unplug a mouse
# events &
[1] 880765
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00000000, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
...
... Mouse events
...
SCREEN_EVENT_POINTER(index=805306368, pos=[39,343], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[28,343], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[14,343], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,343], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,344], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,347], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,350], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,354], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,362], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,367], buttons=0x0000, hwheel=0, wheel=0)
SCREEN_EVENT_POINTER(index=805306368, pos=[0,370], buttons=0x0000, hwheel=0, wheel=0)
If you run events and then plug a keyboard in, type a few keys on the keyboard, unplug the keyboard
# events &
[1] 880765
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00000000, pname=84)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
SCREEN_EVENT_PROPERTY(window=0x00110040, pname=154)
...
... Keyboard events
...
SCREEN_EVENT_KEYBOARD(index=805306368, cap=61618, flags=225, modifiers=0, scan=90, sym=61524)
SCREEN_EVENT_KEYBOARD(index=805306368, cap=61618, flags=224, modifiers=0, scan=90, sym=61524)
SCREEN_EVENT_KEYBOARD(index=805306368, cap=61618, flags=225, modifiers=0, scan=90, sym=61524)
SCREEN_EVENT_KEYBOARD(index=805306368, cap=61618, flags=224, modifiers=0, scan=90, sym=61524)
SCREEN_EVENT_KEYBOARD(index=805306368, cap=61467, flags=225, modifiers=0, scan=41, sym=61467)
Page updated: