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.

Dark GDK / keyboard input

Author
Message
sadyk
15
Years of Service
User Offline
Joined: 6th Sep 2009
Location: Spain-Madrid
Posted: 10th Sep 2009 00:06
ok, i have had a look into the darkGDK keyboard input funtions, and i have seen the next functions:
dbUpKey : int dbUpKey ( void )
dbDownKey : int dbDownKey ( void )
dbLeftKey : int dbLeftKey ( void )
dbRightKey : int dbRightKey ( void )
dbControlKey : int dbControlKey ( void )
dbShiftKey : int dbShiftKey ( void )
dbReturnKey : int dbReturnKey ( void )
dbEscapeKey : int dbEscapeKey ( void )
dbSpaceKey : int dbSpaceKey ( void )
dbScanCode : int dbScanCode ( void )
dbKeyState : int dbKeyState ( int iScanCode )
dbEntry$ : char* dbEntry$ ( void )
dbGetClipboard$ : char* dbGetClipboard$ ( void )
dbGetRegistry : int dbGetRegistry ( char* szFolder, char* szKey )
dbGetRegistry$ : char* dbGetRegistry$ ( char* szFolder, char* szKey )
my question is : does exist a function like dbLeftKey() but for example with P key
and if the anwer is not, which is the scancode of every single key

thanks for your time

sorry my english
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 10th Sep 2009 01:09

Hope I got them right.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 10th Sep 2009 01:59
Or open "DInput.h" and have a look through it.. it will be with your DirectX SDK somewhere most likely..

It has all the scancodes listed including variation that are keyboard dependant :



If it ain't broke.... DONT FIX IT !!!
sadyk
15
Years of Service
User Offline
Joined: 6th Sep 2009
Location: Spain-Madrid
Posted: 10th Sep 2009 11:29
thank you too much to you two. i´m very pleased becouse of your messeges

sorry my english
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 10th Sep 2009 15:41
Quote: "

Hope I got them right.
"


all keyboards have the same scan codes?

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 10th Sep 2009 16:27
Quote: "all keyboards have the same scan codes?"


Yeah. I do believe so.


Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 10th Sep 2009 17:18
All English QWERTY keyboards that follow the standard 104-105 key design(like the one in zapakitul's picture) will have similar scancodes. Keyboards that are not QWERTY such as those used in non-english speaking countries may have different scancodes based on their layout.

If it ain't broke.... DONT FIX IT !!!
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 10th Sep 2009 18:54
oh, i see

Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 10th Sep 2009 20:48
The scan codes mean the position of the key, so they should be the same for non-English layout as well. The difference is what letters are painted on the keys. I can switch my keyboard between English and my mother language, and if I press a key, I get the same scan code with both layouts, but a different character (which is represented by a different ASCII code).

Login to post a reply

Server time is: 2024-10-01 12:26:22
Your offset time is: 2024-10-01 12:26:22