atom-preview icon indicating copy to clipboard operation
atom-preview copied to clipboard

Shortcut to open / hide preview

Open screendriver opened this issue 10 years ago • 13 comments

Is there a keyboard shortcut to open and hide the preview?

screendriver avatar Nov 20 '15 10:11 screendriver

used to be Ctrl+Alt+Y I believe. you can set your own binding if you wanted. the action is preview:toggle

ddavison avatar Nov 20 '15 12:11 ddavison

@ddavison is correct. See https://github.com/Glavin001/atom-preview/blob/master/lib/preview.coffee#L29-L34

Glavin001 avatar Nov 20 '15 17:11 Glavin001

Ok, thank you. This should definitely be displayed when I press Command + Shift + P and search for Preview :wink: All other commands shows there their keyboard shortcuts.

screendriver avatar Nov 21 '15 07:11 screendriver

I agree. Not sure why that is not the case. Could you inquire with the Atom team at https://github.com/atom/atom what the criteria is for being shown there? Thank you.

Applicable code: https://github.com/Glavin001/atom-preview/blob/master/lib/preview.coffee#L29-L34

Glavin001 avatar Nov 21 '15 13:11 Glavin001

I've made an issue for that: https://github.com/atom/atom/issues/9758

screendriver avatar Nov 23 '15 10:11 screendriver

is Ctrl+shift+Y really reserved though? in our keymap cson file, it's commented out.

ddavison avatar Nov 23 '15 12:11 ddavison

Looks like it might be disabled / keymap not setup by default.

Glavin001 avatar Nov 23 '15 13:11 Glavin001

Well I am not sure if we want to reserve a keymapping or simple let Users create their own. I usually search for preview in the Atom command palette instead.

Glavin001 avatar Nov 23 '15 14:11 Glavin001

For new users that are using preview a lot it's more comfortable to have a keyboard shortcut :wink:

screendriver avatar Nov 24 '15 09:11 screendriver

Sure. I am open to suggestions for what the key mapping should be, and that does not collide with other packages.

I am happy to review and merge a Pull Request enabling a keyboard shortcut.

Glavin001 avatar Nov 24 '15 14:11 Glavin001

⌘ Shift P is unfortunately occupied :wink:

What about ⌘P ⌘R (PReview)?

screendriver avatar Nov 24 '15 14:11 screendriver

Is there a website to search for existing keyboard shortcuts across all packages for Atom? That would be helpful to make sure we avoid collisions.

⌘P + ⌘R sounds good so far. Doubt anyone has taken that already.

I am ready and willing to receive any Pull Requests on this matter :smile:. Thanks!

Glavin001 avatar Nov 24 '15 15:11 Glavin001

Is there a website to search for existing keyboard shortcuts across all packages for Atom? That would be helpful to make sure we avoid collisions.

That would be a great feature. But I don't believe that something exist that can do that. Sorry I can't make a pull request. I don't know how to write packages for Atom and how to modify atom-preview for that :confused:

screendriver avatar Nov 25 '15 06:11 screendriver