22#ifndef COMMON_HARDWARE_KEY_H
23#define COMMON_HARDWARE_KEY_H
25#include "common/scummsys.h"
27#include "common/array.h"
28#include "common/events.h"
29#include "common/keyboard.h"
30#include "common/str.h"
34typedef uint32 HardwareInputCode;
85 static HardwareInput createKeyboard(
const String &i, KeyState ky,
const U32String &desc) {
86 HardwareInput hardwareInput;
88 hardwareInput.description = desc;
90 hardwareInput.inputCode = 0;
91 hardwareInput.key = ky;
95 static HardwareInput createJoystickButton(
const String &i, uint8 button,
const U32String &desc) {
99 static HardwareInput createJoystickHalfAxis(
const String &i, uint8 axis,
bool positiveHalf,
const U32String &desc) {
103 static HardwareInput createMouse(
const String &i, uint8 button,
const U32String &desc) {
108 static HardwareInput createSimple(
HardwareInputType type,
const String &i, HardwareInputCode ic,
const U32String &desc) {
109 HardwareInput hardwareInput;
110 hardwareInput.id = i;
111 hardwareInput.description = desc;
112 hardwareInput.type =
type;
113 hardwareInput.inputCode = ic;
114 return hardwareInput;
123 HardwareInputCode code;
128 if (hw->code == code) {
137 if (
id.equals(hw->hwId)) {
172 HardwareInputCode code;
178 if (hw->code == code) {
187 if (
id.equals(hw->hwId)) {
Definition: algorithm.h:29
HardwareInputType
Definition: hardware-input.h:36
@ kHardwareInputTypeMouse
Definition: hardware-input.h:42
@ kHardwareInputTypeJoystickButton
Definition: hardware-input.h:44
@ kHardwareInputTypeJoystickHalfAxis
Definition: hardware-input.h:46
@ kHardwareInputTypeKeyboard
Definition: hardware-input.h:40
@ kHardwareInputTypeInvalid
Definition: hardware-input.h:38
@ kHardwareInputTypeCustom
Definition: hardware-input.h:48
const ModifierTableEntry defaultModifiers[]
const HardwareInputTableEntry defaultMouseButtons[]
const AxisTableEntry defaultJoystickAxes[]
const HardwareInputTableEntry defaultJoystickButtons[]
const KeyTableEntry defaultKeys[]
AxisType
Definition: hardware-input.h:163
@ kAxisTypeFull
Definition: hardware-input.h:165
@ kAxisTypeHalf
Definition: hardware-input.h:167
Definition: hardware-input.h:170
Definition: hardware-input.h:121
Definition: keyboard.h:294
Definition: hardware-input.h:148
Definition: hardware-input.h:157