Jump to content

*SOLVED* Help with keyboard scan codes


Recommended Posts

Posted

I want to be able to prompt the player to press a movement key and then script a response based on the player’s input.

 

what i want to ensure is that if a player uses non-WASD layouts, that I can account for that. When I’m waiting for forward (for example), I’d typically look for code 87. But if a user has remapped forward to be E (ESDF), then if I prompt for forward, the user will be pressing the wrong key, right?

 

or do the scan codes get updated when remapping?

 

i don’t even know if there’s a way to pull the key mapping from the user’s settings. 

Posted

Scan code are done in a way that makes them independent of the keyboard layout (almost.)

So if you use the scancode for 'W' you get it when the key that is where on a US layout the key W is, is pressed.

Posted

And that’s what i figured. So, that means if i wanted to prompt the user for a direction, I’d need to be able to pull their key mapping.

Posted

CK wiki is not the best source for infos.

Most of the relevant info are on Nexus or TESVForum or here.

Posted

99% of everything I've accomplished has been from reading the CK wiki and applying good programming practices. /shrug

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...