I don't have much experience working with external devices.

GetKey is fully compatible with the TI Keyboard. However, it seems that GetCSC returns nothing. It can't seem to get scancodes from the keyboard.

How could I get what key the user is pressing without having to pause for input?
The problem might be how the keyboard sends the data. I don't really know how it's sent, though. _GetKey can return key combinations ([2nd]/[Alpha] + another key) whereas _GetCSC will return the keys pressed individually. The keyboard might return the key combos directly. There might also be something special going on in the interrupts during _GetKey, too, i can't say. I don't have a keyboard to test it out, so unfortunately i can't really offer much help.

How is the keyboard connected? If it's through the link port maybe you need to read the keypresses from the link port?
From what I recall of BrandonW's exploration, the keycodes are available via _GetKey but not _GetCSC, as the _GetKey interrupt interacts with the keyboard. It does indeed connect through the link port, so presumably you can read the codes manually. If it's like the PS/2 protocol, you probably have to set a row to read, then wait for which columns in that row are set. WikiTI discusses reading the keycodes via the OS, but does not mention interacting directly with the keyboard.
KermMartian wrote:
From what I recall of BrandonW's exploration, the keycodes are available via _GetKey but not _GetCSC, as the _GetKey interrupt interacts with the keyboard. It does indeed connect through the link port, so presumably you can read the codes manually. If it's like the PS/2 protocol, you probably have to set a row to read, then wait for which columns in that row are set. WikiTI discusses reading the keycodes via the OS, but does not mention interacting directly with the keyboard.


Hmm, I'm not sure how to do that.
The reason I don't want to use _GetKey is because it stops the program until a key is pressed.
However, when I was use Mimas, the program does not stop when I plug in the keyboard, suggesting that they somehow are able to get keyboard input without having a wait.

That's sort of what I want to figure out.
You mean you can use the keyboard with Mimas? You might want to take a look at Mimas' source, then.

EDIT: It actually appears that Mimas uses _GetKey (see [p1util.asm] label "P1_GetKey"), just using a cursor hook to change the cursor.
  
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
Page 1 of 1
» 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

 

Advertisement