The other thing I need to pick a bone with you about is the ctrl/shift/caps system. I found it positively baffling when I tried to use LuaZM, and I may make changes to try to make the system more intuitive. I'm also considering making gets() and friends show a cursor, a cursor that changes to an A, a, 1, etc as the mode changes. I'd strongly recommend that you add something like that in case I don't get to it quickly.
» Forum
> Your Projects
I thought of a cursor too, I might look at this. It could change color according to whether you're in shift, alpha or caps mode.
juju2143 wrote:
I thought of a cursor too, I might look at this. It could change color according to whether you're in shift, alpha or caps mode.
Also, can you make the [MODE] key work properly to leave the add-in in such a way that when you press it again, you return to text entry? If you need help with doing that, I would be happy to toss the proper canned code in your direction. KermMartian wrote:
juju2143 wrote:
I thought of a cursor too, I might look at this. It could change color according to whether you're in shift, alpha or caps mode.
Also, can you make the [MODE] key work properly to leave the add-in in such a way that when you press it again, you return to text entry? If you need help with doing that, I would be happy to toss the proper canned code in your direction. juju2143 wrote:
KermMartian wrote:
juju2143 wrote:
I thought of a cursor too, I might look at this. It could change color according to whether you're in shift, alpha or caps mode.
Also, can you make the [MODE] key work properly to leave the add-in in such a way that when you press it again, you return to text entry? If you need help with doing that, I would be happy to toss the proper canned code in your direction.To add code in a wiki, alll you do is put a space before each line you want in <pre> format.

Links to my calculator projects
I lurk #cemetech, if you want to contact me that and email are probably best.
I lurk #cemetech, if you want to contact me that and email are probably best.

Juju: Tetrizm does it this way. The latter two lines are the key ones.
Code:
if ((key = PRGM_GetKey())) {
int r,c,k;
GetKeyWait_OS(&r,&c,2,1,0,&k);
Bdisp_EnableColor(1);
}
This post unfortunately is the second draft of itself, the first having disappeared in an unfortunate key-fumbling incident. So, I'm loving PrizmIO, and there's a few features I want/need to make it even more awesome, particularly for use in LuaZM. To whit:
:: Use of an OS key syscall like PRGM_GetKey() to allow for proper screenshotting. See preceding post.
:: Use of an OS syscall sequence as above to allow for proper use of the [MENU] key in programs.
:: Fix the way modifiers work. If I were writing it, I would have four modes: normal, shift, alpha, and uppercase-alpha (ie, shift-alpha). Get rid of caps and ctrl; they're confusing. Start off in normal mode, not caps (?) mode. Turn off all modifiers after one key press. The character set seems good, but I reserve the right to suggest additions.
I think there are a few unused keys, like normal-ln, normal-sin, etc. Actually, you'd also need an uppercase/lowercase mode. I recommend you do it TI-83+-style.
:: Something is really wrong with tab. Even after you backspace a tab, the resulting string is incorrect.
:: A cursor. At least an underline at the current position in the foreground color. An underlined 'a' for alpha, an underlined up-arrow symbol for shift, an 'A' for shift-alpha, and an inverted underlined 'A' or 'a' for uppercase or lowercase alpha-lock mode.
:: Lower-priority: history.
:: Use of an OS key syscall like PRGM_GetKey() to allow for proper screenshotting. See preceding post.
:: Use of an OS syscall sequence as above to allow for proper use of the [MENU] key in programs.
:: Fix the way modifiers work. If I were writing it, I would have four modes: normal, shift, alpha, and uppercase-alpha (ie, shift-alpha). Get rid of caps and ctrl; they're confusing. Start off in normal mode, not caps (?) mode. Turn off all modifiers after one key press. The character set seems good, but I reserve the right to suggest additions.

:: Something is really wrong with tab. Even after you backspace a tab, the resulting string is incorrect.
:: A cursor. At least an underline at the current position in the foreground color. An underlined 'a' for alpha, an underlined up-arrow symbol for shift, an 'A' for shift-alpha, and an inverted underlined 'A' or 'a' for uppercase or lowercase alpha-lock mode.
:: Lower-priority: history.
-
juju2143
- Member (Posts: 145)
-
- 21 Aug 2012 11:24:42 am
- Last edited by juju2143 on 21 Aug 2012 01:07:40 pm; edited 1 time in total
KermMartian wrote:
:: Use of an OS key syscall like PRGM_GetKey() to allow for proper screenshotting. See preceding post.
:: Use of an OS syscall sequence as above to allow for proper use of the [MENU] key in programs.
KermMartian wrote:
:: Fix the way modifiers work. If I were writing it, I would have four modes: normal, shift, alpha, and uppercase-alpha (ie, shift-alpha). Get rid of caps and ctrl; they're confusing. Start off in normal mode, not caps (?) mode. Turn off all modifiers after one key press. The character set seems good, but I reserve the right to suggest additions.

KermMartian wrote:
:: Something is really wrong with tab. Even after you backspace a tab, the resulting string is incorrect.
KermMartian wrote:
:: A cursor. At least an underline at the current position in the foreground color. An underlined 'a' for alpha, an underlined up-arrow symbol for shift, an 'A' for shift-alpha, and an inverted underlined 'A' or 'a' for uppercase or lowercase alpha-lock mode.
KermMartian wrote:
:: Lower-priority: history.
I think it'll keep me occupied for a while.

KermMartian wrote:

I am sorry I misunderstood him. Yes, I was tired. :-/
Links to my calculator projects
I lurk #cemetech, if you want to contact me that and email are probably best.
I lurk #cemetech, if you want to contact me that and email are probably best.
juju2143 wrote:
KermMartian wrote:
:: Fix the way modifiers work. If I were writing it, I would have four modes: normal, shift, alpha, and uppercase-alpha (ie, shift-alpha). Get rid of caps and ctrl; they're confusing. Start off in normal mode, not caps (?) mode. Turn off all modifiers after one key press. The character set seems good, but I reserve the right to suggest additions.

KermMartian wrote:
:: A cursor. At least an underline at the current position in the foreground color. An underlined 'a' for alpha, an underlined up-arrow symbol for shift, an 'A' for shift-alpha, and an inverted underlined 'A' or 'a' for uppercase or lowercase alpha-lock mode.
KermMartian wrote:
:: Lower-priority: history.
I think it'll keep me occupied for a while.

IMO there should be two functions, a blockingish one that will return the fancy chars, and one that is mainly just an expanded Getkey_* function that returns the raw keycodes for use with arrow's and such but also allows for the custom mapping used by the current setup. Basically like getcsc vs Getkey on the TI calc's. That way there can be consistency for the custom mapping and arrow keys while still allowing for the more advanced input buffering.

"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
TheStorm wrote:
juju2143 wrote:
KermMartian wrote:
:: Fix the way modifiers work. If I were writing it, I would have four modes: normal, shift, alpha, and uppercase-alpha (ie, shift-alpha). Get rid of caps and ctrl; they're confusing. Start off in normal mode, not caps (?) mode. Turn off all modifiers after one key press. The character set seems good, but I reserve the right to suggest additions.

KermMartian wrote:
:: A cursor. At least an underline at the current position in the foreground color. An underlined 'a' for alpha, an underlined up-arrow symbol for shift, an 'A' for shift-alpha, and an inverted underlined 'A' or 'a' for uppercase or lowercase alpha-lock mode.
KermMartian wrote:
:: Lower-priority: history.
I think it'll keep me occupied for a while.

IMO there should be two functions, a blockingish one that will return the fancy chars, and one that is mainly just an expanded Getkey_* function that returns the raw keycodes for use with arrow's and such but also allows for the custom mapping used by the current setup. Basically like getcsc vs Getkey on the TI calc's. That way there can be consistency for the custom mapping and arrow keys while still allowing for the more advanced input buffering.
That's a good idea. Actually right now you can check if a certain key is pressed or not, but a getch function that return PRGM_GetKey codes instead would be a good idea.
Also I'm out of town for the weekend and I forgot my cable to upload stuff on my Prizm and my bro dragged me outside all the time for the last 3 days so I've had no time whatsoever to program anything, so sorry for the lack of updates this week. And remember, if you want to help me, feel free to fork my project on GitHub, make the change and if I like I'll merge the change into my branch.
Hope you enjoy your weekend, and I look forward to your progress when you return. I'm feeling unwell this weekend, so I'm afraid I'm not going to be able to make a branch and add new features just yet.
for the up/down/left/right and other special keys -> why not use a word for that and a byte for normal stuff? if getch or w/e returns a short or int that can be possible.
<edit>
What about m68k keyboard style? That way was much better to me than the z80 calc method as it was much faster ad easier to use.
<edit>
What about m68k keyboard style? That way was much better to me than the z80 calc method as it was much faster ad easier to use.
Will the next version of PrizmIO be incompatible with the current version, or if I start on a project of mine using it now will upgrading PrizmIO later keep compatibility?
Ashbad wrote:
Will the next version of PrizmIO be incompatible with the current version, or if I start on a project of mine using it now will upgrading PrizmIO later keep compatibility?
As far as I understand, the changes are mostly going to be internal, including the cursors, the improved keymappings, and possible history storage, and the API won't change much if at all. I'd say that even if it does change, it won't be drastic, so you're likely safe in not wasting much time if you use the current version.
PrizmIO updated to upstream (I think), so new cursors (if they work), new functions names (you can keep compatibility with a #define) and stdio replacement. Tonight: improved keymapping and serial port stdio replacement. Have fun.
juju2143 wrote:
PrizmIO updated to upstream (I think), so new cursors (if they work), new functions names (you can keep compatibility with a #define) and stdio replacement. Tonight: improved keymapping and serial port stdio replacement. Have fun.
Great, sounds awesome. I need functions that let me write or read a specific number of characters to/from the terminal, rather than until an end-of-string or [ENTER]; does PrizmIO have that yet? Or should I just build them myself out of your putc/getch routines?
IIRC there's a number of characters parameter, but it doesn't work yet. Might check this out as well. For now, you can just wrap around getch.
juju2143 wrote:
IIRC there's a number of characters parameter, but it doesn't work yet. Might check this out as well. For now, you can just wrap around getch.
OK, that is reasonable. Did you get a chance to try out the cursor stuff yet to see if it works?
UPDATE
PrizmIO merged with its Nspire counterpart! All new commits are now at this URL: http://nspforge.unsads.com/p/nspireio
Also rewrote the keyboard part, might or might not work yet.
PrizmIO merged with its Nspire counterpart! All new commits are now at this URL: http://nspforge.unsads.com/p/nspireio
Also rewrote the keyboard part, might or might not work yet.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2, 3 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 2 of 3
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement