Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

event-push inserts a fake event into the runloop (e.g. from a virtual keyboard)

Parameter Description
t Event type, e.g. EVENT_KEYPRESS
x Parameter 1, which is x-corrdinate for button events or key code for keyboard events
y Parameter 2, which is y-coordinate for button events

Example

Example from modules/modules/ln_glgui/keypad.scm, where a fake keyboard button press is generated if a on-screen keyboard button is released.

(if keyevent (begin
  (event-push EVENT_KEYPRESS keyevent 0)
  (glgui-widget-set! g wgt 'highlight keycmd)
))
Clone this wiki locally