VulkanEngine 0.1
Graphics engine using Vulkan
Loading...
Searching...
No Matches
KeyboardInput.h
1// Copyright (c) 2024 Michael Carlie. All Rights Reserved.
2//
3// This software is released under the MIT License.
4// https://opensource.org/licenses/MIT
5
6#ifndef INCLUDE_VULKANENGINE_KEYBOARDINPUT_H_
7#define INCLUDE_VULKANENGINE_KEYBOARDINPUT_H_
8
9#include <map>
10
11namespace VulkanEngine {
12
15 friend class Window;
16
17 public:
19 enum KeyStatus { PRESSED, RELEASED, REPEAT, NO_STATUS };
20
22 struct KeyInfo {
25
27 int key_id;
28 };
29
33 const KeyStatus getLastKeyStatus(int key_id);
34
35 private:
37 std::map<int, KeyInfo> key_status_map;
38};
39
40} // namespace VulkanEngine
41
42#endif // INCLUDE_VULKANENGINE_KEYBOARDINPUT_H_
Class which provides ability to read keyboard input from windowing system.
Definition: KeyboardInput.h:14
const KeyStatus getLastKeyStatus(int key_id)
Definition: KeyboardInput.cpp:24
KeyStatus
Represents different states that keys can be in.
Definition: KeyboardInput.h:19
Provides an abstract interface for window implementations.
Definition: Window.h:20
TODO development of this class is in progress.
Definition: Attribute.h:13
Contains information about a particular key.
Definition: KeyboardInput.h:22
int key_id
The windowing system specific key id.
Definition: KeyboardInput.h:27
KeyStatus status
The current status of the key.
Definition: KeyboardInput.h:24