(34S) Full Key Scan Map w/ A-Z to 1-26 conversion [highly compressed; <37 steps!]
|
08-26-2016, 02:14 PM
(This post was last modified: 08-27-2016 12:11 AM by Nick.)
Post: #1
|
|||
|
|||
(34S) Full Key Scan Map w/ A-Z to 1-26 conversion [highly compressed; <37 steps!]
This key scan / menu converts letters A-Z to 1-26 with the exception of Y which is firmware reserved (substitute any key/chord of your choice for Y/25). The design uses exclusion and accumulating offsets for compression.
If you desire values other than 1-26, insert your additional offset after line 25 (ex. to convert to ASCII). If you can compress it further, I'd love to see it and learn some new tricks. The demo returns 1-26 for A-Z and negative values for the remaining scan codes. Insert your code everywhere you like! Enjoy, Nick Code: 01 LBL 'KEY' Comments: All labels shown (except KEY and 00) are required due to the alpha conversion formula's use of exclusion. If you're not using them, they still need to be in place and you can simply route them to no-action/loop as a group. Insert your code to respond to A-Z between 25 and 26 including any further offset(s) (ex. ASCII). Step 26 loops to repeat the demo. Insert your code for other keys after labels at steps 27 through 36, adjusting branching as desired. Step 37 denotes scan codes for the demo and can be removed. Step 38 loops to repeat the demo. Edit: Updated Subject from 39 to 37 steps! |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(34S) Full Key Scan Map w/ A-Z to 1-26 conversion [highly compressed; <37 steps!] - Nick - 08-26-2016 02:14 PM
RE: (34S) Full Key Scan Map w/ A-Z to 1-26 conversion [highly compressed; <39 steps!] - Nick - 08-26-2016, 11:49 PM
|
User(s) browsing this thread: 2 Guest(s)