-
-
Notifications
You must be signed in to change notification settings - Fork 163
feat(thumbwheel-tap): expose thumbwheel tap separately #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -579,6 +579,25 @@ mod tests { | |
| ); | ||
| } | ||
|
|
||
| #[test] | ||
| fn thumbwheel_capture_arms_only_for_non_default_behavior() { | ||
| let maps = Arc::new(RwLock::new(hook_runtime::HookMaps::default())); | ||
| assert!(!thumbwheel_armed(&maps, DEFAULT_THUMBWHEEL_SENSITIVITY)); | ||
|
|
||
| maps.write() | ||
| .expect("hook maps") | ||
| .bindings | ||
| .insert(ButtonId::Thumbwheel, Action::AppExpose); | ||
| assert!(thumbwheel_armed(&maps, DEFAULT_THUMBWHEEL_SENSITIVITY)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This expectation keeps the upgraded-config failure reachable. Older configs can contain an explicit Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
|
|
||
| maps.write() | ||
| .expect("hook maps") | ||
| .bindings | ||
| .insert(ButtonId::Thumbwheel, Action::None); | ||
| assert!(!thumbwheel_armed(&maps, DEFAULT_THUMBWHEEL_SENSITIVITY)); | ||
| assert!(thumbwheel_armed(&maps, DEFAULT_THUMBWHEEL_SENSITIVITY + 1)); | ||
| } | ||
|
|
||
| #[test] | ||
| fn rearms_when_the_current_session_dies_with_a_target() { | ||
| // The live session ended on its own while a device is still targeted. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.