devkitSMS icon indicating copy to clipboard operation
devkitSMS copied to clipboard

Add support for the keyboard of the SC-3000(H) and SK-1100

Open amoibos opened this issue 1 year ago • 1 comments

Detecting mutiple keys simultaneously and encode in the returned key code the row and value of the pressed key. Tested with MEKA 0.80-alpha(2023-08-26).

Python snippet to decode the value: val=26624; int(bin(val)[:-12][2:].rjust(4,'0'),2), bin(val)[-12:]

amoibos avatar Apr 21 '24 17:04 amoibos

Thank you for this, it can be quite useful. I remember I once thought about using this approach too, it's quite effective. :+1:

May I ask you to rename the function as SG_getKeycodes (with a lowercase 'g') for consistency with other function names?

Also I think the SDCC compiler might generate better code if you move unsigned int keyb_stat, row_no; inside the (outer) for loop, because those variables don't need to exist outside of that loop. Likely a minor optimization but we'll gladly take that :smiley:

sverx avatar Apr 22 '24 07:04 sverx

@amoibos did you miss my reply? :sweat_smile:

sverx avatar May 03 '24 08:05 sverx

Thank you for your contribution! :smiley:

sverx avatar May 04 '24 12:05 sverx