Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
sam spade
21
Years of Service
User Offline
Joined: 13th Mar 2004
Location:
Posted: 17th May 2006 03:32
I've written a simple routine reading scancodes for text input along with shiftkey() for capitalization. However the bottom row of keys (zxcvbnm) only seem to respond to the right side shift key i get no result for these keys if holding the left-hand shift?

I suppose this is a bug? I'm running DBP5.9.
Zeddex
19
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 17th May 2006 18:42
did you try using keystate() until shiftkey()

like



If Zeddex can, you can. If you have an idea, make it.
Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 17th May 2006 18:48
Get u6

Theme park simulator wip boards

geecee3
21
Years of Service
User Offline
Joined: 25th Feb 2004
Location: edinburgh.scotland.
Posted: 17th May 2006 22:47
there are known issues when trying to read the scancodes of similtanious keypresses, this appears to be a limitation in hardware and it can vary from machine to machine. this has been discussed before in the TTYT thread, there are solutions depending on the requirements of your program. one usefull thing is the windows keyboard entry buffer.

beware scancode overlapping issues, it requires a bit of logical thinking on your behalf. I myself managed to get a half decent implimentation of scancodes up and running for the TTYT mini game base code, but it has limitations with shifting. the same as you do.

so forget keystate() if you need to read any more than 2 keys at the same time. even if you do manage to get a decent implimentation of it yourself, its not garunteed to work on all keybaords, cheap keyboards have rubbish encoders, and laptops have generally DIRE encoders / decoders. some wont recognise space at the same time as the cursors, prooved time and time again in games on this forum.

its a bit of a grey area when it comes to detecting multiple scancodes in a single pass.

cheers Grant.

Ohd Chinese Ploverb say : Wise Eskimo, not eat yerrow snow.
sam spade
21
Years of Service
User Offline
Joined: 13th Mar 2004
Location:
Posted: 18th May 2006 13:37
Zeddex - I'll give that a go and see if things improve - cheers

Sunrise - Good idea but will it solve the problem -from geecee3s comment perhaps not - we'll see

geecee3 - thanks for a good explanation of the issues; 1 question - how do I use the windows keyboard entry buffer?

Does anyone have a better solution for getting text input from the user in DBP?

Login to post a reply

Server time is: 2025-06-29 13:27:03
Your offset time is: 2025-06-29 13:27:03