Skip to content
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

Feature request: use H/L or J/K to move between scrollable areas #24

Closed
zmre opened this issue May 20, 2024 · 34 comments
Closed

Feature request: use H/L or J/K to move between scrollable areas #24

zmre opened this issue May 20, 2024 · 34 comments

Comments

@zmre
Copy link

zmre commented May 20, 2024

I'd rather use my home row to move between scrollable areas than tab and shift-tab. I expect h/l probably work for horizontal scrolling (rarely a need for me) so am suggesting capital J/K as an alternative to tab for switching scrollable areas.

Alternatively -- and I almost just added this as a comment there -- making keys configurable per #18 would probably cover this feature request, too. If there are plans to do that, then this can probably be closed and consider this a +1 there. I put it in as a separate request as adding an alternate mapping is probably a quick change versus making a UI to customize shortcuts.

Thanks again for a great tool. (It would be perfect if it also worked with electron apps like Slack though I get there are technical reasons why this is difficult since those apps don't play nice with MacOS accessibility features.)

@godbout
Copy link
Owner

godbout commented May 21, 2024

I'd rather use my home row to move between scrollable areas than tab and shift-tab.

had to check the doc 😂️ yeah i use kV on top of Scrolla so personally i enter Vim mode and use j/k. (same for navigating the Targets with Wooshy. Vim mode and j/k ftw.) you don't prefer using control n and control p over tab and shift-tab? way more useful in macOS. like for terminal history, UI dropdowns etc.

I expect h/l probably work for horizontal scrolling (rarely a need for me)

yes. i use those daily.

so am suggesting capital J/K as an alternative to tab for switching scrollable areas.

more on this below.

Alternatively -- and I almost just added this as a comment there -- making keys configurable per #18 would probably cover this feature request, too. If there are plans to do that, then this can probably be closed and consider this a +1 there. I put it in as a separate request as adding an alternate mapping is probably a quick change versus making a UI to customize shortcuts.

yeah i think the way to go is to allow people to remap all keys. BUT. 1) it's already doable with tools outside of Scrolla/Wooshy/kV, and especially done for that 2) if i do it (90% chance i'll do it) this has to be done properly, and for the three apps. which is why it's taking me so long to research and experiment.

adding hardcoded shortcuts in the apps depending on people's workflows is quite a big no no tho. with KE and Hammerspoon you can actually catch Scrolla's status and remap the keys however you want. see #18 (comment). that may be worth checking out for you in the short term.

Thanks again for a great tool. (It would be perfect if it also worked with electron apps like Slack though I get there are technical reasons why this is difficult since those apps don't play nice with MacOS accessibility features.)

yeah, can't do the magic if the apps don't play nice. but i'm thinking of a manual way. can you check my last two comments there and chip in?: #16

would that be workable? basically using numbers to position the mouse kinda manually. i'm not expecting people having to type more than a sequence of three numbers max.

@zmre
Copy link
Author

zmre commented May 21, 2024

with KE and Hammerspoon you can actually catch Scrolla's status and remap the keys however you want

I saw your note about Hammerspoon and KE. Those are apps that I've tried but don't use and don't particularly want running on my machine all the time. I used to use skhd for key remapping and liked that, but currently don't run it either.

you don't prefer using control n and control p over tab and shift-tab?

Huh, I didn't think to try those. I use those shortcuts in many places. But when I feel like I'm in some sort of Normal Mode, I don't reach for the chords. I generally think of those when in some sort of Insert mode so for completions and such. To me, they aren't the intuitive choice here. Same thing with activating kindavim - by activating scrolls I put myself in Normal Mode of a sort. To then do it a second time feels odd to me.

can you check my last two comments there and chip in?

I will look.

@godbout
Copy link
Owner

godbout commented May 21, 2024

I saw your note about Hammerspoon and KE. Those are apps that I've tried but don't use and don't particularly want running on my machine all the time. I used to use skhd for key remapping and liked that, but currently don't run it either.

thing is i've dealt with key mapping for kV and i can tell you that it's another project altogether. so no wonder apps like KE exist. i can't imagine doing a full custom remapping in kV/Ws/Sl itself... (still gonna try something good enough but yeah, if people were using KE that'd help a lot.)

Huh, I didn't think to try those. I use those shortcuts in many places. But when I feel like I'm in some sort of Normal Mode, I don't reach for the chords. I generally think of those when in some sort of Insert mode so for completions and such. To me, they aren't the intuitive choice here. Same thing with activating kindavim - by activating scrolls I put myself in Normal Mode of a sort. To then do it a second time feels odd to me.

interesting. i mostly always use j``k now with kV, but when i'm in the terminal i use j``k for navigating a clean history while i use control n``control p to navigating the history of the command i've started typing. fo me it's like they all go up or down. anyways. different people, different brains, need custom mapping lol (😭️)

I will look.

thanks. would be nice to have a clearer idea before i start the work.

@zmre
Copy link
Author

zmre commented May 23, 2024

I have a vim mode in command line so if I escape to it, then I navigate up and down with j/k, but if I'm in insert mode, I use ctrl-n/p. They both work the same but my brain is fairly well conditioned to reach for the right one at the right time.

On the remapping -- the KE problems should be way harder than what you face. You just need to swap out the keys you're listening for in-app to something variable that derives from a configuration with some set default. They have to intercept keys globally, prevent them from doing anything else and instead send something different to the OS. The number of race conditions and key listener priority stack bugs is mind boggling to think about.

Anyway, I'm replying on the other ticket right now. The tldr there: I think the subdividing approach is a good direction.

@godbout
Copy link
Owner

godbout commented May 24, 2024

I have a vim mode in command line so if I escape to it, then I navigate up and down with j/k, but if I'm in insert mode, I use ctrl-n/p. They both work the same but my brain is fairly well conditioned to reach for the right one at the right time.

kinda same here, except i'm mostly never in insert mode 😂️ but i bind zsh-autosuggestions history to control n/p so i use both quite often.

On the remapping -- the KE problems should be way harder than what you face.

"logically" maybe. technically i'm not sure. at least with a virtual keyboard driver you have control as soon as the key are pressed. then you do whatever you want with it. with event taps like kV's even if you place yourself at the top of the event stream, an app started earlier (or later) can take over and grab events before you. (i'm not even talking about the bugs that prevent you to place the tap in different places in the stream, etc. all reported to Apple but hey, they're busy selling iPads lol.) i still haven't figured out even how to make kV behave properly on some specific keyboard layouts etc. 😴️

Anyway, I'm replying on the other ticket right now. The tldr there: I think the subdividing approach is a good direction.

👍️ thanks!

@godbout
Copy link
Owner

godbout commented Nov 8, 2024

@zmre starting working on the custom key mapping. can you chip in? #24
thank you!

@godbout
Copy link
Owner

godbout commented Dec 12, 2024

@zmre you're still using Scrolla? i'm adding custom key mapping but it's gonna take some time so i'm thinking about adding the keys you requesting temporary in the next release. lemme know.

@zmre
Copy link
Author

zmre commented Dec 12, 2024

I'm still using it. Sorry I've been triaging all the things on my plate lately. Will try to look today.

@godbout
Copy link
Owner

godbout commented Dec 12, 2024

excellent. no worries. i'll try to make a quick release soon with H/L J/L. most probably will be removed once the custom key mapping will be available. then you can set your keys the way you want. will keep you up to date.

@zmre
Copy link
Author

zmre commented Dec 12, 2024

What did you need me to chip in on? #24 is this issue. Would love even just the more limited addition of keys.

@godbout
Copy link
Owner

godbout commented Dec 12, 2024

What did you need me to chip in on? #24 is this issue.

fuck. lol

Would love even just the more limited addition of keys.

anything else i can add them? 😅️ not even sure i'll add them in the release notes. could add some more.

@godbout
Copy link
Owner

godbout commented Dec 12, 2024

What did you need me to chip in on? #24 is this issue.

should have been #18

but i'm gonna add a comment because i've worked on it and it changed a bit. any comment appreciated. like does yaml make sense? is there a better type of config file. blah blah blah

@zmre
Copy link
Author

zmre commented Dec 12, 2024

I think that's it for needs. I can imagine a lot more but not sure I'd use them so would be glad just to stop with tab and lately ctrl chords. Thanks!

@godbout
Copy link
Owner

godbout commented Dec 12, 2024

you got it. hopefully i get the custom key mapping done, and i'm done with people requesting other keys for Scrolla and Wooshy 😂️😂️😂️ thanks for the swift answers!

@godbout
Copy link
Owner

godbout commented Dec 13, 2024

release later today. and btw regarding this 👇️

(It would be perfect if it also worked with electron apps like Slack though I get there are technical reasons why this is difficult since those apps don't play nice with MacOS accessibility features.)

there's been a Manual Mode for some weeks now if you haven't noticed: https://github.com/godbout/Scrolla.docs?tab=readme-ov-file#manual-mode

you can now position the cursor manually with (currently) digit keys and apply the scrolling there. should take care of 99% of the scrolling needs. hopefully.

@godbout
Copy link
Owner

godbout commented Dec 13, 2024

i'm also going to redo all the GIFs/videos for kV/Ws/Sl with the updated features and UI etc. may make it clearer.

@godbout
Copy link
Owner

godbout commented Dec 13, 2024

release later today. and btw regarding this 👇️

@zmre just J/K enough right? or do you really need H/L too?

@zmre
Copy link
Author

zmre commented Dec 13, 2024 via email

@godbout
Copy link
Owner

godbout commented Dec 13, 2024

I noticed that today, but haven' thad a chance yet to test it out. But I'm excited about that for when I'm in Slack, in particular.

should cover a lot of use cases but it's also the first version. if needed it can be improved, just let me know. i have some ideas like allowing multiple concurrent presses of the digits to pinpoint more precisely where to go but it's a lot of extra work so if people usually don't request those stuff go low priority.

I try not to have non-native GUI apps going although...

hehe yeah same. even hard to understand why imposing one's UI and rewriting standards rather than sticking with the platform you're on but...

yeah, just tried the new proton mail app and it's a weird one. Whooshy does nothing in it (nothing is selectable) but scrolla seems to work okay.

oh you should have let me know. if something doesn't work or some app is not supported at least i'll dig into it. will add Proton in the todo list and see if i can make it work before next release. thanks.

@godbout
Copy link
Owner

godbout commented Dec 13, 2024

release later today. and btw regarding this 👇️

@zmre just J/K enough right? or do you really need H/L too?

@zmre release soon. last chance

i've checked Proton and it doesn't work yeah. Homerow and Shortcat can't get it either. over the years i've had to build a bunch of custom engines for shit apps. might have to be the case with Proton too but not sure because even though some parts are accessible with the Accessibility Inspector, it can't highlight them. so it might be again some sort of rubbish half accessible framework they're using. in any case i'll dig more into it until i'm sure of what's happening, but definitely not included in the Scrolla release coming soon.

@godbout
Copy link
Owner

godbout commented Dec 13, 2024

oh and Scrolla "works" because if it can't detect anything, it uses the whole window instead. smooth and indiscernible for users hehe. i was pretty proud of that one.

@godbout
Copy link
Owner

godbout commented Dec 13, 2024

@godbout godbout closed this as completed Dec 13, 2024
@godbout
Copy link
Owner

godbout commented Dec 15, 2024

@zmre some good news some bad ones. so it's possible to get Proton to work with Wooshy. broken AX so needs a custom engine. BUT! it also works ONLY after you move the Proton main window, whether with the mouse of with keyboard shortcuts lol. so bizarre...

Screen.Recording.2024-12-15.at.23.41.58.mov

will try to see if i can find a way to hack that shit but it's really another level of hackery. crazy

@zmre
Copy link
Author

zmre commented Dec 15, 2024 via email

@godbout
Copy link
Owner

godbout commented Dec 15, 2024

That’s very weird. But thanks for getting it to work. I wondered what they were doing that was unusual and the app is open source, but it looks like it’s just electron so who knows. https://github.com/ProtonMail/inbox-desktop

they just don't care about the AX. Electron kinda come with AX out of the box but it's shit too. then developers wrap the Electron thing around their app and break the thing even more. what's supposed to happen is the macOS Window is the root of the AX Tree and you go down that list. in more and more Electron apps by wrapping Electron they just break the AX Tree links. it's just pure shit lol. no way they're doing anything regarding accessibility because it's just purely broken.

i'll see if i can find a trick for the "moving the window" thing before Wooshy is able to get the whole tree. hopefully i think of something before the 27th, else i'm gonna have to pay for a license! (kidding. using Airmail here. native. kV all the way in there. never gonna change!)

@zmre
Copy link
Author

zmre commented Dec 15, 2024 via email

@godbout
Copy link
Owner

godbout commented Dec 17, 2024

@zmre GOOD NEWS!

found a hack. now my code looks even better than before!

Screenshot 2024-12-17 at 16 44 58

the custom work for Proton needs cleaning and making it more robust but we'll get there. will be added in the next kV/Ws/Sl's release! thank you ❤️

@zmre
Copy link
Author

zmre commented Dec 17, 2024 via email

@godbout
Copy link
Owner

godbout commented Dec 18, 2024

i have a goldfish type of memory. forget everything i did three days ago. so i need my code to be written in prose. pure english. like a novel. so that when i read it again i know exactly what's happening. but ngl i'm not very happy about the "A" in "doABunchOfShitFor...". the camel case doesn't work well here. it looks ugly. which makes me a little upset...

@godbout
Copy link
Owner

godbout commented Dec 21, 2024

those fucking non native apps... i get Proton working UNTIL you restart your computer. if you do, then you need or to move the main window manually, or to quit and restart Proton. i really hope people enjoy those apps' UI and UX coz the backend has to be utter shit lol

@zmre
Copy link
Author

zmre commented Dec 21, 2024 via email

@godbout
Copy link
Owner

godbout commented Dec 21, 2024

I try to avoid electron apps but it isn’t always possible. I used a terminal interface to slack for awhile but people post images a lot and it had some quirks so back to the gui, which luckily I had a lot of keyboard shortcuts I’ve come to know…

i refuse any kind of job where i may have to use any Electron app. oh also i haven't had a job in ten years.

Ugh.

ultimately not too bad. the fact that i can reproduce the failure by rebooting my Mac means i still have another five days of controllable investigation woohoo. update coming later. maybe at Christmast.

@godbout
Copy link
Owner

godbout commented Dec 21, 2024

*s

@godbout
Copy link
Owner

godbout commented Jan 2, 2025

@zmre Proton Mail supported in the latest Wooshy: https://github.com/godbout/Wooshy.docs/releases/tag/31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants