Omnimaga
Calculator Community => TI Calculators => Calculator C => Topic started by: Matrefeytontias on May 04, 2014, 03:12:20 pm
-
Hola,
So that one is a first for me. I have one program, and nspire_emu only detects multi-arrow-keys presses if it's emulating a non-CX Nspire. If it's emulating a CX one, the last pressed key overwrites the preceding one (like, if I hold right then press up, it'll only understand up).
At first I thought that was only nspire_emu, but testing on real HW from a TI-Planet member (I only have a Nspire CAS, on which it worked well) told me that that wasn't nspire_emu.
So I finally thought that was because of the touchpad (again, some may say). That's what I currently have :
typedef int KeyEvent; // because cleanliness
inline KeyEvent getk(void)
{
return (((isKeyPressed(KEY_NSPIRE_UP) << 1) + isKeyPressed(KEY_NSPIRE_RIGHT) << 1) + isKeyPressed(KEY_NSPIRE_LEFT) << 1) + isKeyPressed(KEY_NSPIRE_DOWN);
}
I wrote a small debug wrapper for you to test if you wish :
typedef int KeyEvent;
KeyEvent getk(void)
{
int i;
KeyEvent k;
while(!isKeyPressed(KEY_NSPIRE_ENTER))
{
k = (((isKeyPressed(KEY_NSPIRE_UP) << 1) + isKeyPressed(KEY_NSPIRE_RIGHT) << 1) + isKeyPressed(KEY_NSPIRE_LEFT) << 1) + isKeyPressed(KEY_NSPIRE_DOWN);
for(i = 3; i >= 0; i--)
printf("%d", (k >> i) & 1);
printf("\n");
SDL_Delay(1000);
}
return k;
}
Look at the console while you press keys ; [enter] to quit.
Any idea ?
-
Does it also not work on touchpad monochrome calcs ?
Also since the touchpad isn't multi touch you can't detect two arrows, but you can still detect diagonals.
-
Well I guess it won't work although I can't really test, I'm only left with a TI-Nspire CAS clickpad and a TI-Nspire CX CAS (thus touchpad) ROM, and switching keyboards within nspire_emu will make arrow keys non-working within the emu.
I also tried reading diagonals with KEY_NSPIRE_LEFTUP and such, but that didn't work either.
-
IIRC the clickpad calcs are compatible with touchpad keyboards though. :/
-
Yeah that's what I thought, so it's really weird ; morever I never had this problem before switching to Ndless 3.1 r914 (my CAS prototype must stay with OS 3.1).
-
Oh nice you have a proto calc. :D
-
Yeah well it's not serving me pretty well for instance >_>
-
I also noticed this, and it caused me to try designing other control schemes. I have not yet been able to come up with something good though. Thing is you need those diagonals in most games, and diagonals on the keypad = hurts thumbs. I think it's best to try using the keyboard as d-pad but not 100% sure yet. Also I'm fairly sure gbc4nspire supports multi arrow keys with keypad, so I'm not sure what causes this :/
-
I forgot to update the topic, but it's actually the latest nspire_emu's fault, since from what those with a CX told me diagonals work fine (see nKaruga).