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

maybe add option to change the default keys? #18

Open
well1791 opened this issue May 22, 2023 · 16 comments
Open

maybe add option to change the default keys? #18

well1791 opened this issue May 22, 2023 · 16 comments

Comments

@well1791
Copy link

I know this is vim-inspired and it's awesome (absolutely mind blowing), but, considering there is people using a different keyboard distro (non-qwerty), may be adding an option to override the defaults may be helpful.

@godbout
Copy link
Owner

godbout commented May 22, 2023

you mean keyboards without jkduGg keys? the keys aren't "hardcoded", and respond to users' keyboard layouts. or is there something i'm missing?

@godbout
Copy link
Owner

godbout commented May 22, 2023

i'm asking coz i'm not sure if you're literally talking about options to choose your own ways to scroll, like m instead of j for example (this currently doesn't exist), or if you're having issue with different keyboard layouts (this should be taken into consideration and if it doesn't work then it's a bug).

@well1791
Copy link
Author

well1791 commented May 22, 2023

it's not a bug per se, more like a feature consideration, what I'm trying to say is that I use a different keyboard layout distribution, so, the letters hjkl are not in the home row (except for k), so, I was wondering if there is a way to re-map the current keys to something else.

@godbout
Copy link
Owner

godbout commented May 22, 2023

ah, i see. didn't make sense coz i had kindaVim in mind, but yeah, i see, you wanna keep the home row. usually what i've been recommending for custom mapping is using Karabiner-Elements or Hammerspoon. Karabiner-Elements is especially made for this. although for Scrolla itself, it's less of an issue to add a few custom keys. it's not like a whole .vimrc like for kV. so yeah, added to the list of things to explore. thanks. no ETA tho. will update the thread once i start digging.

@ldebritto
Copy link

+1 for that. Much prefer IJKL to match my Ferris Arrow layout

@godbout
Copy link
Owner

godbout commented Nov 22, 2023

+1 for that. Much prefer IJKL to match my Ferris Arrow layout

well i could do a native solution, but you can do it with KE and Hammerspoon. see post above.

@alex35mil
Copy link

alex35mil commented May 12, 2024

I configured Karabiner to enable a Scrolla layer with my remappings and disable it on Esc, but it is far from perfect since I can leave the scrolling mode not only via Esc, but literally with any key combo or a click and I'm not sure if there's a reliable way to make Karabiner to unset the variable on any keystroke except the ones I use for scrolling.

It would be great to have an option to change the defaults instead of dealing with Karabiner.

@alex35mil
Copy link

I found the section regarding the Distributed Notifications API and implemented it via Hammerspoon + Karabiner [commit].

@godbout
Copy link
Owner

godbout commented May 13, 2024

@alex35mil does it work well? i had to remove the Distributed Notifications and replace them by something else for kV coz it was too slow and kinda unpredictable.

is your solution working exactly the way you want? or would still adding settings to change the default keys be useful natively? i'd like to add that to Scrolla but as usual when you start digging then it becomes a series of hard questions: do i allow only one mapping? several? one keys or several keys? how do i represent things in the Settings? text input? dropdowns? blah blah blah. lemme know what you have in mind. that'll help me figure out something. thanks.

@well1791
Copy link
Author

do i allow only one mapping? several? one keys or several keys? how do i represent things in the Settings? text input? dropdowns? blah blah blah. lemme know what you have in mind. that'll help me figure out something. thanks.

I believe for most vim users this should be as "simple" as using a config file to remap things.. but this involves adding some "doc" page explaining what format to use (maybe toml?) and what things are able to modify, also, I believe the settings UI would be nine to allow the user search/pick the config file.. in my case I would place this file in .local/scrolla/config.toml but that may be different for other users

@godbout
Copy link
Owner

godbout commented May 13, 2024

I believe for most vim users this should be as "simple" as using a config file to remap things..

so basically writing a Karabiner-Elements from scratch 🤣️🤣️🤣️ in that case i have a really hard time seeing the point. especially for Scrolla. for kV yes, but for Scrolla (and Wooshy), i'd expect having a bunch of users that are not super into Vim or don't care about Vim motions, so my idea would be to allow anyone to change the mapping easily through the UI. if it's through config files then why not using KE/Hammerspoon? macOS keyboard remapping is its whole thing in itself, which is why you have tools like KE taking care just of this.

what i can see is that there's definitely a stronger and deeper need for kindaVim. so i'll have to dig into this. but this needs to be 1) done separately, maybe as a package 2) heavily tested. once done i may want to use that package for Wooshy and Scrolla. but again, that may mean 1) specific syntax for kV/Wooshy/Scrolla (which is a disadvantage imo) rather than widespread KE 2) heavy work that is not gonna happen overnight.

but this involves adding some "doc" page explaining what format to use (maybe toml?) and what things are able to modify, also, I believe the settings UI would be nine to allow the user search/pick the config file.. in my case I would place this file in .local/scrolla/config.toml but that may be different for other users

yeah this also brings a whole lot of discussion. some people want yaml, some want toml, some want json, others want edn. some want the stuff to be stored in macOS's standard folders. some in XDG directories, blah blah blah.

not discarding the whole idea because in the long term i think it's very needed, again at least for kV, to have native kV remapping. but in the short/middle term i want something simpler. at least development wise, and for mainstream users. something that i can get out in a few weeks, and still heavily tested (automatedly. yes just invented the word).

@alex35mil
Copy link

@godbout hey, I'm using Distributed Notifications without any issues. I use Hammerspoon to listen for the notifications + to set a Karabiner variable, and Karabiner to do the remappings. I don't see any perf issues with this setup and things work the way I want it.

@godbout
Copy link
Owner

godbout commented May 14, 2024

@godbout hey, I'm using Distributed Notifications without any issues. I use Hammerspoon to listen for the notifications + to set a Karabiner variable, and Karabiner to do the remappings. I don't see any perf issues with this setup and things work the way I want it.

thanks for letting me know. it appears that the CLI might be slow, so i wondered if it was an issue in your case. would you still rather get the remapping natively within Scrolla? also if you don't mind sharing, it'd be interesting for me to know what kind of remapping you (and others) are doing. thank you!

@alex35mil
Copy link

alex35mil commented May 14, 2024

it appears that the pqrs-org/Karabiner-Elements#3627, so i wondered if it was an issue in your case.

@godbout I don't notice any slowness, but I don't use it in a tight loop - just to activate a scroll mode.

would you still rather get the remapping natively within Scrolla?

Personally, I'm fine with either, but it is indeed quite a sophisticated setup. Not everyone would be motivated.

also if you don't mind sharing, it'd be interesting for me to know what kind of remapping you (and others) are doing. thank you!

I'm on Dvorak and I don't use hjkl at all. I have a dedicated layer on a keyboard, where I bound arrow keys to the physical hjkl keys. So I remapped hjkl to arrows. Here are all the remappings.

@godbout
Copy link
Owner

godbout commented May 14, 2024

@godbout I don't notice any slowness, but I don't use it in a tight loop - just to activate a scroll mode.

ok. good to know. thanks.

Personally, I'm fine with either, but it is indeed quite a sophisticated setup. Not everyone would be motivated.

yeah. i think for kV i'd except for people to be ok with KE and Hammerspoon but for Scrolla and Wooshy not so much.

I'm on Dvorak and I don't use hjkl at all. I have a dedicated layer on a keyboard, where I bound arrow keys to the physical hjkl keys. So I remapped hjkl to arrows. Here are all the remappings.

thank you! was curious about sequences rather than single letters.

if you're using Scrolla intensively, you may want to chip in here: #16 (comment)

pondering a way to move the cursor around for apps that don't support the macOS Accessibility.

@godbout
Copy link
Owner

godbout commented Jul 27, 2024

i'm gonna start developing custom key mapping. my current idea would be a yaml file that you can open from the Settings. in that file you'd define all the mapping you want for each of Scrolla's function. for example:

scroll_a_bit_up:
  - j
 scroll_a_lot_up:
  - u
  - control u
...

any other/better idea?

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

4 participants