Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
12-30-2016, 05:24 PM (This post was last modified: 12-30-2016 05:25 PM by Claudio L..)
Post: #500
RE: newRPL: [UPDATED December-29-16] Firmware for testing available for download
List of new features and changes:

* Added support for HALT, CONT, KILL, and a new feature: conditional breakpoints.
* Added support for custom key definitions (ASN renamed to ASNKEY, also implemented DELKEY, RCLKEYS, STOKEYS).


For those who want to try, here's how it works:

ASNKEY:
Action_Object KeyName Context

Action_Object is the program to execute when you press the key. It not only accepts programs, but any object. Most objects are EVAL'ed, others receive special treatment:
* If a list is given, the first object is EVAL'ed or inserted in the editor instead of always EVALed. This allows to include commands instead of programs as in { SIN }. When in D mode, SIN will be EVALed, in A mode SIN() will be typed, and in P mode SIN will be inserted. Secondaries :: ; inside a list are executed transparently when in the editor (normal behavior of a program is to close the editor, compile whatever was in the editor, then run the program, this runs the program without ever closing the editor). IDENTS behave much like they do in menu definitions (directories are changed without closing the editor, etc.). Also a string inside a list is treated as text to type (like a keyboard macro), rather than as a string object.

KeyName is a string (forget about those shift plane numbers!) with the format:

"KK[.SS[.EE]]"

Where KK is the name of the key (A thru Z, 0 to 9, +,-,*,/, DT for dot, SP for space, EN for enter, UP/DN/LF/RT for the cursors and BK for backspace).
.SS is the optional shift, and can be L, LH , R, RH, A, AH, OH for (Left, Left-hold, etc.)
.EE is the event type, and can be P for press (default), D for key down, U for key up, L for long press, R for repeat (only works on some keys), and T for long repeat.

Context is a number that indicates whether we are in the stack, the editor, etc. For now let's use 0 which means the key definition will act always.

Some key examples:

"Hello" "4..L" 0 ASNKEY --> Will assign the string "Hello" to the key 4, unshifted, when you do a long press.
"World" "4..T" 0 ASNKEY --> Will assign the string to the key 4, unshifted, long repeat.

Now press and hold 4 and you should see on the stack:
"Hello"
"World"
"World"
...
"World"

to delete this assignment just use DELKEY with the key name:

"4..T" DELKEY
"4..L" DELKEY

Key definitions don't overwrite each other, they add the new definition with higher priority than any existing one.
So you can define:

"Hello" "4..L" 0 ASNKEY
"World" "4..L" 0 ASNKEY

Now long-pressing 4 will show "World". Deleting this key:
"4..L" DELKEY will only delete the latest definition, and now long-pressing will show "Hello", which is still defined.
You need to delete the other definition as well with a second
"4..L" DELKEY

One last example (a prank?):
Make the 4 key work like a 7:
{ "7" } "4" 0 ASNKEY
{ "7" } "4.A" 0 ASNKEY
{ "7" } "4.AH" 0 ASNKEY

The first assignment takes care of the usual press, the second one changes it when in alpha mode, the third one changes the definition when in Alpha-Hold mode.

By the way, the System/Keys menu has a "DISABLE" key that allows you to enable/disable the custom keys, in case you make typing impossible (like the example above). This is flag -4, nothing special.

Have fun redefining the keyboard!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: [UPDATED December-29-16] Firmware for testing available for download - Claudio L. - 12-30-2016 05:24 PM



User(s) browsing this thread: 1 Guest(s)