09-14-2017, 08:00 PM
I've been tinkering with user keys to add some convenience functions, but I can't quite figure out how to return from them cleanly and consistently.
If you return a string, it treats that as a sequence of keys. If you return a number that's a valid key code, it treats it as pressing that key. If you return a number that's not a valid key code, it does the default function of the key that you actually pressed.
How do I set up a user key function that simply runs some routines, then returns with no simulated keystrokes? Suppose I wanted a user key function that does nothing but set the current base to hexadecimal (i.e. Base:=3), and can be used from any place where user keys are allowed, without any other side effects. What would that look like?
If you return a string, it treats that as a sequence of keys. If you return a number that's a valid key code, it treats it as pressing that key. If you return a number that's not a valid key code, it does the default function of the key that you actually pressed.
How do I set up a user key function that simply runs some routines, then returns with no simulated keystrokes? Suppose I wanted a user key function that does nothing but set the current base to hexadecimal (i.e. Base:=3), and can be used from any place where user keys are allowed, without any other side effects. What would that look like?