Keyboard macros: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: corrected some typos.) |
No edit summary |
||
Line 1,126: | Line 1,126: | ||
whenstamp: arg whenFID; call lineout whenFID,strip(left(date('U'),6)left(date("S"),4) time() arg(2)); call lineout whenFID,' '; call lineout whenFID; return |
whenstamp: arg whenFID; call lineout whenFID,strip(left(date('U'),6)left(date("S"),4) time() arg(2)); call lineout whenFID,' '; call lineout whenFID; return |
||
</lang> |
</lang> |
||
=={{header|Ring}}== |
|||
<lang ring> |
|||
load "guilib.ring" |
|||
app = new qApp { |
|||
win = new qWidget() { |
|||
setWindowTitle("Don't accept Spaces") |
|||
move(100,100) resize(400,400) |
|||
new qLineedit(win) { |
|||
myfilter = new qAllEvents(win) { |
|||
setkeypressevent("keypress()") |
|||
} |
|||
installeventfilter(myfilter) |
|||
} |
|||
show() |
|||
} |
|||
exec() |
|||
} |
|||
func keypress |
|||
nKey = myfilter.getkeycode() |
|||
switch nKey |
|||
on 16777264 see "You pressed F1 " + nl |
|||
on 16777265 see "You pressed F2 " + nl |
|||
off |
|||
</lang> |
|||
Output: |
|||
<pre> |
|||
�You pressed F1 |
|||
You pressed F2 |
|||
</pre> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |