summaryrefslogtreecommitdiffstats
path: root/src/common/key_map.h
blob: 7e94df6181608582bdd50553243cb632fbf90db0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.

#pragma once

#include "core/hle/service/hid.h"

namespace KeyMap {

class CitraKey {
public:
    CitraKey() : keyCode(0) {}
    CitraKey(int code) : keyCode(code) {}

    int keyCode;

    bool operator < (const CitraKey &other) const {
        return keyCode < other.keyCode;
    }

    bool operator == (const CitraKey &other) const {
        return keyCode == other.keyCode;
    }
};

struct DefaultKeyMapping {
    KeyMap::CitraKey key;
    HID_User::PADState state;
};

void SetKeyMapping(CitraKey key, HID_User::PADState padState);
HID_User::PADState Get3DSKey(CitraKey key);

}