##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: September 2016 # Modified: 2016-10-27/10:07-0400 ##+ # # control.icn, demonstrate the &control key status keyword # link enqueue, evmux procedure main() window := open("control", "g", "size=20,20", "canvas=hidden") # Enqueue an event with a "c" modifier, setting the control key state Enqueue(window, &lpress, 11, 14, "c", 2) Enqueue(window, &lrelease, 11, 14, "", 2) w := Active() write(image(w)) e := Event(w, 1) write("event at mouse position (", &x, ",", &y, ")") write("&control: ", image(&control)) e := Event(w, 1) write("event at mouse position (", &x, ",", &y, ")") write("&control: ", image(&control)) close(window) end