How to read keyboard events using only the core libraries? #3130
-
First of all, thank you for your work on this great language! In order to learn Odin language, I would like to create myself a small terminal text editor. Therefore, I need to read keyboard events. Since my main objective is to become familiar with the standard library, I was wondering whether it might be possible to use only Does anyone have some idea how to read keyboard events using only the core libraries? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Core library for that kind of thing does not really exist. You would need to create your own input library using the available OS specific options and bindings. |
Beta Was this translation helpful? Give feedback.
Core library for that kind of thing does not really exist. You would need to create your own input library using the available OS specific options and bindings.
Included with ODIN are the vendor libraries and you can use SDL or raylib glfw or others to get keyboard events in a very easy way.
Otherwise I believe you would have to do it the normal platform api specific way.
For example on windows using VkKeyScanExA and GetKeyboardState apis which I believe are available in the core library.
You would need to do that for each platform. If thats not what your looking for than use the previously mentioned platform abstraction layers SDL,GLFW or raylib etc..