libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
KeyboardKeyToAnyMapping.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
5#include "KeyboardScancodes.h"
6
7namespace Ship {
8class Window;
9
18 public:
23 KeyboardKeyToAnyMapping(KbScancode scancode, std::shared_ptr<Window> window);
24
27
34 bool ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode);
35
37 std::string GetPhysicalDeviceName() override;
38
40 std::string GetPhysicalInputName() override;
41
42 protected:
45 std::shared_ptr<Window> mWindow;
46
47 private:
48 std::shared_ptr<Window> GetWindow() const;
49};
50} // namespace Ship
Base class for controller mappings that represent a physical input.
Definition ControllerInputMapping.h:16
Base class for mappings that bind a keyboard key to any controller input.
Definition KeyboardKeyToAnyMapping.h:17
bool mKeyPressed
Definition KeyboardKeyToAnyMapping.h:44
bool ProcessKeyboardEvent(KbEventType eventType, KbScancode scancode)
Processes a raw keyboard event and updates the internal pressed state.
std::string GetPhysicalDeviceName() override
Returns the human-readable name of the keyboard device.
KeyboardKeyToAnyMapping(KbScancode scancode, std::shared_ptr< Window > window)
Constructs a keyboard-key mapping for the given scan code.
std::string GetPhysicalInputName() override
Returns the human-readable name of the bound key.
virtual ~KeyboardKeyToAnyMapping()
Destructor.
std::shared_ptr< Window > mWindow
Definition KeyboardKeyToAnyMapping.h:45
KbScancode mKeyboardScancode
Definition KeyboardKeyToAnyMapping.h:43
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
KbScancode
Platform-independent keyboard scan codes used by the input mapping system.
Definition KeyboardScancodes.h:26
KbEventType
Identifies the type of a keyboard event delivered to the input mapping system.
Definition KeyboardScancodes.h:12