Comments (4)
So this is the mapping of scan codes GetKeyNameText
dumps on my system:
0x1 -> Esc
0x2 -> 1
0x3 -> 2
0x4 -> 3
0x5 -> 4
0x6 -> 5
0x7 -> 6
0x8 -> 7
0x9 -> 8
0xa -> 9
0xb -> 0
0xc -> -
0xd -> =
0xe -> Backspace
0xf -> Tab
0x10 -> Q
0x11 -> W
0x12 -> E
0x13 -> R
0x14 -> T
0x15 -> Y
0x16 -> U
0x17 -> I
0x18 -> O
0x19 -> P
0x1a -> [
0x1b -> ]
0x1c -> Enter
0x1d -> Ctrl
0x1e -> A
0x1f -> S
0x20 -> D
0x21 -> F
0x22 -> G
0x23 -> H
0x24 -> J
0x25 -> K
0x26 -> L
0x27 -> ;
0x28 -> '
0x29 -> `
0x2a -> Shift
0x2b -> \
0x2c -> Z
0x2d -> X
0x2e -> C
0x2f -> V
0x30 -> B
0x31 -> N
0x32 -> M
0x33 -> ,
0x34 -> .
0x35 -> /
0x36 -> Right Shift
0x37 -> Num *
0x38 -> Alt
0x39 -> Space
0x3a -> Caps Lock
0x3b -> F1
0x3c -> F2
0x3d -> F3
0x3e -> F4
0x3f -> F5
0x40 -> F6
0x41 -> F7
0x42 -> F8
0x43 -> F9
0x44 -> F10
0x45 -> Pause
0x46 -> Scroll Lock
0x47 -> Num 7
0x48 -> Num 8
0x49 -> Num 9
0x4a -> Num -
0x4b -> Num 4
0x4c -> Num 5
0x4d -> Num 6
0x4e -> Num +
0x4f -> Num 1
0x50 -> Num 2
0x51 -> Num 3
0x52 -> Num 0
0x53 -> Num Del
0x54 -> Sys Req
0x56 -> \
0x57 -> F11
0x58 -> F12
0x7c -> F13
0x7d -> F14
0x7e -> F15
0x7f -> F16
0x80 -> F17
0x81 -> F18
0x82 -> F19
0x83 -> F20
0x84 -> F21
0x85 -> F22
0x86 -> F23
0x87 -> F24
0x7c to 0x87 just happen to be the VK_F13 to VK_F24 values.
There are 2 possibilities... Either the Windows developers screwed up and unintentionally mixed up scan codes and virtual key codes, or for some reason this was deliberate but undocumented. Either way, it is highly unlikely this will be changed/fixed any time soon on the Windows end, so we would have to remap 0x64-0x76 to 0x7c-0x87 before sending them to GetKeyNameText
.
from sfml.
Should be fixed with #2873.
from sfml.
Just fixed this in v3 (master
branch). I think we'll patch this in v2 as well at a later time.
from sfml.
Thank you for the quick fix!
from sfml.
Related Issues (20)
- SFML problem on old nvidia graphic card HOT 6
- Generated documentation contains some HTML errors HOT 2
- Doxygen contains empty / useless "Namespaces" and "Files" pages HOT 2
- Wrong usage of GNUInstallDirs when generating pkg-config files HOT 8
- All `Texture`s loaded from `.bmp` files render only monochrome+transparent, with RGBA colors flipped (on `RectangleShape`s) HOT 4
- Broken pkg-config Libs.private OpenGL libraries with MinGW cross compilation. HOT 4
- `sf::WindowBase::pollEvent` triggers input monitoring prompt on macOS even though it's not needed HOT 4
- Deduplicate implementations of `WindowBase::create` and `Window::create`
- Unexpected Memory Usage in sf::VertexBuffer HOT 3
- Refactor raw pointer + ref count to a `std::shared_ptr` in Unix/Display.cpp HOT 2
- WebGL Support HOT 1
- choco package HOT 3
- Android CI jobs have broken HOT 2
- Conflict between SRP and OCP HOT 2
- [2.6.1] segfault in waitEvent on close (Ubuntu/X11/Multithreading) HOT 7
- [2.6.1] Drawing to RenderTexture "fails" after Texture copied from (Windows) HOT 3
- Add a CMake guide for static linking the library in MacOS/Linux HOT 1
- `sf::VideoMode::getDesktopMode()` returning the monitor resolution on macOS HOT 2
- Install prefix not honored HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfml.