Keypad Entry - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Keypad Entry (/showthread.php?tid=1373) Pages:
1
2
|
RE: Keypad Entry - SMcNeill - 01-09-2023 As I mentioned previous, it's an underlying GLUT issue. Try and hold down CTRL and press ANY of the number keys.... You won't get a keydown or keyup value for any of them with _KEYHIT. We're aware of it, an issue is in the repo concerning it, and when someone gets a chance, they'll work into seeing what we can do about it. (It may require removing glut completely and swapping over to something like GLFW instead. Who knows at this point yet, what the final fix might be?) Option 1 is to use the windows commands directly to get their keycodes. Code: (Select All) $If WIN Then Option 2 is to make use of my KeyHit library which remaps these windows codes into the same values that we're used to seeing with _KEYHIT and _KEYDOWN. Option 3 is to just not use those keys until someone can finally get a fix in for this longstanding issue. RE: Keypad Entry - SMcNeill - 01-09-2023 https://qb64phoenix.com/forum/showthread.php?tid=21 <-- Keyboard Library is your friend! RE: Keypad Entry - JRace - 01-09-2023 I'm guessing the codes come from GLUT, which I know nothing about. Steve mentioned his keyboard library. I'm not sure where to find that. Maybe he'll chime in again? Steve chimed in as I was typing. Thank you, sir! Maybe after some sleep I'll look into using the Windows API to get Windows scancodes, but my brain is fried for the day. Code: (Select All) bed: RE: Keypad Entry - eoredson - 01-09-2023 So, the only remaining solution to coding keypad-5 is the following: Code: (Select All) Rem Keypad-5 = 76 RE: Keypad Entry - SMcNeill - 01-09-2023 (01-09-2023, 04:17 AM)JRace Wrote: I'm guessing the codes come from GLUT, which I know nothing about. Post before yours. https://qb64phoenix.com/forum/showthread.php?tid=21 RE: Keypad Entry - SMcNeill - 01-09-2023 (01-09-2023, 04:18 AM)eoredson Wrote: So, the only remaining solution to coding keypad-5 is the following: I tend to go with: Code: (Select All) '$INCLUDE:'Keyboard Library.BI' RE: Keypad Entry - eoredson - 01-09-2023 That is a nice library.. Could it edited to return ascii 0-255 and extended ascii 0-255? Thanks. RE: Keypad Entry - SMcNeill - 01-09-2023 (01-09-2023, 04:38 AM)eoredson Wrote: That is a nice library.. Fully editable to return whatever you want it to. Currently it's configured for US, german, italian, and european keyboards, if you just change the init call, but you can set it up to return whatever you'd like with it. |