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

Command+Shift+V keyboard binding conflicts with expected OS "Paste and Match Style" behaviour #42

Closed
sublimal opened this issue Jun 7, 2022 · 6 comments

Comments

@sublimal
Copy link

sublimal commented Jun 7, 2022

This is a fairly common keyboard shortcut (Command+Shift+V) to paste without style. Sol hooking this hotkey is overriding the expected OS behaviour even without sol being open.

private let clipboardManagerHotKey = HotKey(key: .v, modifiers: [.command, .shift])

As there is currently no way to disable or customise keybindings in sol can this shortcut be changed to something that doesn't conflict with the OS defaults?
Command+Option+V may be a viable alternative - this to me reads intuitively as 'prompt me for options to paste'

@ospfranco
Copy link
Owner

Currently there is no option to customize this behavior, but your are right, I'll add it later

@ospfranco
Copy link
Owner

There is a new release (1.1.27), you can now choose command + option + v as a shortcut for the clipboard manager

@sublimal
Copy link
Author

I've initiated an upgrade and restarted the app.

Pressing the keyboard combination now results in Sol crashing. Logs from console:

error   19:46:45.302571+1000    sol     Invariant Violation: scrollToIndex out of range: item length 0 but minimum is 1

This error is located at:
    in s
    in s
    in mge
    in RCTView
    in Unknown
    in RCTView
    in Unknown
    in kb

default 19:46:45.366628+1000    sol     *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Invariant Violation: scrollToIndex out of range: item length 0 but minimum is 1

I also don't see an option in settings.

@sublimal
Copy link
Author

I've done some further testing and was unable to replicate the crash. I did notice is 3-4 times but haven't been able to do it again. I'll report back if I can make a repro.

I still don't see an option in settings though:
image
image

@ospfranco
Copy link
Owner

Hmm that settings view looks broken, let me take a look

@ospfranco
Copy link
Owner

That crash usually happens when you have no items in your clipboard (something with auto-scroll), should be fixed now. The settings should now be fixed as well. Latest version is 1.1.28.

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