SourceCoder 2.5 has long had a virtual calculator keypad that lets you type tokens via a familiar menu format rather than having to guess what SourceCoder uses for each token. It also makes typing unusual characters and symbols much easier. Unfortunately, it requires a good deal of initial work to transcribe the menu format into something that I can use via Javascript in SourceCoder. I'll be inserting the menus into the following Prizm-themed editor view:
http://www.cemetech.net/projects/basicelite/sourcecoder2.php?editme=true&calcType=pz
If you hover over the buttons, you'll notice they're mapped to key codes (not necessarily the Prizm OS's keycodes, of course). The "top level" menu is a set of three-element rows, representing (normal), (with Shift/2nd), (with Alpha) outputs for each key. To borrow from the TI example:
Code:
This is the MATH/APPS/PRGM row of the keyboard. 13 is the sub-menu for MATH, 74 is APPS, 22 is PRGM, 27 is VARS. 2nd-MATH is the second element of the first row, 17; menu 17 is TEST. Likewise, 2nd-APPS is ANGLE, menu 21. Items in 'single quotes' are literal outputs, so the third column (ALPHA+key) is the literal A, B, or C typed. Items that are -1 indicate that that key combination does nothing. The Prizm has (norma), (shift), and (alpha) combinations.
That covers the top-level array. If someone could start in on that, it would rock. If it's necessary for me to do a few example keys first, I'd be more than happy to oblige.
The second-level menu arrays are much harder and much more intense. And because of the way Prizm menus work, making you press F6 to go to the next page, we will have a lot more of them. For example, here's the two pages of the MATH menu from the TI example:
Code:
Notice that each menu row has two columns: first, the text to display, and second, the text to insert when that item is chosen, ie, a token. If the second column contains a number instead of a string, that's a menu to jump to when that item is chosen rather than inserting text. Makes sense?
http://www.cemetech.net/projects/basicelite/sourcecoder2.php?editme=true&calcType=pz
If you hover over the buttons, you'll notice they're mapped to key codes (not necessarily the Prizm OS's keycodes, of course). The "top level" menu is a set of three-element rows, representing (normal), (with Shift/2nd), (with Alpha) outputs for each key. To borrow from the TI example:
Code:
13,17,'~A',
74,21,'~B',
22,24,'~C',
27,51,-1,
-1,-1,-1,
This is the MATH/APPS/PRGM row of the keyboard. 13 is the sub-menu for MATH, 74 is APPS, 22 is PRGM, 27 is VARS. 2nd-MATH is the second element of the first row, 17; menu 17 is TEST. Likewise, 2nd-APPS is ANGLE, menu 21. Items in 'single quotes' are literal outputs, so the third column (ALPHA+key) is the literal A, B, or C typed. Items that are -1 indicate that that key combination does nothing. The Prizm has (norma), (shift), and (alpha) combinations.
That covers the top-level array. If someone could start in on that, it would rock. If it's necessary for me to do a few example keys first, I'd be more than happy to oblige.
The second-level menu arrays are much harder and much more intense. And because of the way Prizm menus work, making you press F6 to go to the next page, we will have a lot more of them. For example, here's the two pages of the MATH menu from the TI example:
Code:
menus[19] = new Array(
'NAMES MATH',20,
'1: [A]','~[A]',
'2: [B]','~[B]',
'3: [C]','~[C]',
'4: [D]','~[D]',
'5: [E]','~[E]',
'6: [F]','~[F]',
'7: [G]','~[G]',
'8: [H]','~[H]',
'9: [I]','~[I]',
'0: [J]','~[J]'
);
menus[20] = new Array(
'NAMES MATH',19,
'1: det(','~det(',
'2: {~T}','~{^T}',
'3: dim(','~dim(',
'4: Fill(','~Fill(',
'5: identity(','~identity(',
'6: randM(','~randM(',
'7: augment(','~augment(',
'8: Matr►list(','~Matr►list(',
'9: List►matr(','~List►matr(',
'0: cumSum(','~cumSum(',
'A: ref(','~ref(',
'B: rref(','~rref(',
'C: rowSwap(','~rowSwap(',
'D: row+(','~row+(',
'E: *row(','~*row(',
'F: *row+(','~*row+('
);
Notice that each menu row has two columns: first, the text to display, and second, the text to insert when that item is chosen, ie, a token. If the second column contains a number instead of a string, that's a menu to jump to when that item is chosen rather than inserting text. Makes sense?