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 36 37 38 39 40 41 42 43
|
#include "keyboard/carbon.cpp"
struct InputCarbon : Input {
InputKeyboardCarbon carbonKeyboard;
InputCarbon() : carbonKeyboard(*this) {}
~InputCarbon() { term(); }
auto cap(const string& name) -> bool {
if(name == Input::KeyboardSupport) return true;
return false;
}
auto get(const string& name) -> any {
return {};
}
auto set(const string& name, const any& value) -> bool {
return false;
}
auto acquire() -> bool { return false; }
auto release() -> bool { return false; }
auto acquired() -> bool { return false; }
auto poll() -> vector<shared_pointer<HID::Device>> {
vector<shared_pointer<HID::Device>> devices;
carbonKeyboard.poll(devices);
return devices;
}
auto rumble(uint64 id, bool enable) -> bool {
return false;
}
auto init() -> bool {
if(!carbonKeyboard.init()) return false;
return true;
}
auto term() -> void {
carbonKeyboard.term();
}
};
|