| 30 | namespace mi = mir::input; |
| 31 | |
| 32 | mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, |
| 33 | std::shared_ptr<dispatch::ActionQueue> const& actions, |
| 34 | InputDevice& device, |
| 35 | std::shared_ptr<KeyMapper> const& key_mapper, |
| 36 | std::function<void(Device*)> const& callback) |
| 37 | : device_id{id}, |
| 38 | device{device}, |
| 39 | info(device.get_device_info()), |
| 40 | pointer{device.get_pointer_settings()}, |
| 41 | touchpad{device.get_touchpad_settings()}, |
| 42 | touchscreen{device.get_touchscreen_settings()}, |
| 43 | actions{actions}, |
| 44 | key_mapper{key_mapper}, |
| 45 | device_changed_callback{callback} |
| 46 | { |
| 47 | if (contains(info.capabilities, mi::DeviceCapability::keyboard)) |
| 48 | { |
| 49 | keyboard = MirKeyboardConfig{}; |
| 50 | key_mapper->set_keymap_for_device(device_id, keyboard.value().device_keymap()); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | mi::DefaultDevice::DefaultDevice(MirInputDeviceId id, std::shared_ptr<dispatch::ActionQueue> const& actions, |
| 55 | InputDevice& device, std::shared_ptr<KeyMapper> const& key_mapper) |
nothing calls this directly
no test coverage detected