Skip to content

Commit

Permalink
Map generic_desktop::z and generic_desktop::rz to wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Sep 2, 2023
1 parent d05057d commit 223091e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/share/event_queue/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ static inline std::shared_ptr<queue> make_queue(device_id device_id,
state::original);
}

} else if (v.conforms_to(pqrs::hid::usage_page::generic_desktop,
pqrs::hid::usage::generic_desktop::z)) {
// Convert vertical verticalwheel
pointing_motion_time_stamp = v.get_time_stamp();
pointing_motion_vertical_wheel = static_cast<int>(v.get_integer_value());

} else if (v.conforms_to(pqrs::hid::usage_page::generic_desktop,
pqrs::hid::usage::generic_desktop::rz)) {
// Convert horizontal verticalwheel
pointing_motion_time_stamp = v.get_time_stamp();
pointing_motion_horizontal_wheel = -static_cast<int>(v.get_integer_value());

} else if (v.conforms_to(pqrs::hid::usage_page::leds,
pqrs::hid::usage::led::caps_lock)) {
auto event = event_queue::event::make_caps_lock_state_changed_event(v.get_integer_value());
Expand Down

0 comments on commit 223091e

Please sign in to comment.