-
-
Notifications
You must be signed in to change notification settings - Fork 314
ui.touch.bindings #1678
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: main
Are you sure you want to change the base?
ui.touch.bindings #1678
Conversation
|
Oh this is cool. I'll have a look soon. |
|
A bonus feature that I forgot to document: config.set("ui.touch.bindings", {
-- disable the default 2-finger tap mapping, preserve browser pinch-zoom
{ fingers = 2, command = "", preventDefault = false },
-- add custom mappings for 3-5 fingers
{ fingers = 3, command = "Editor: Toggle Reader Mode", preventDefault = true },
{ fingers = 4, command = "Navigate: Page Picker", preventDefault = true },
{ fingers = 5, command = "Open Command Palette", preventDefault = true },
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall really like this feature, but a few things:
- Please run
make fmtto format the code - Please run
make checkto run the linters (they fail) - Have a look at my comments, some weird stuff in there (do I smell AI coding agents?)
Zef, you're absolutely right, I relied heavily on ChatGPT in putting this PR together. Your analysis reveals that I am even more ignorant than I thought about TypeScript, and you've exposed my relative inexperience at robust programming practices in general. All of your comments make sense, and I will work on tightening this up. Learning opportunity! :-) Glad you like the concept; I'm definitely scratching my own itch here, but without the ability to unmap 2-finger tap, SB would be almost unusable for me on mobile, because I'm constantly pinch-zooming. Thanks. |
Think I've addressed all the issues you raised, and ran make fmt/clean which passes now. See commit v1.3 just pushed. |
Replace hard-coded 2/3-finger touch gestures with new config.set options to map multi-touches to any command (or disable).