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: shortcut for "focus on terminal" #97

Open
ndr-brt opened this issue Nov 23, 2023 · 3 comments
Open

Feature request: shortcut for "focus on terminal" #97

ndr-brt opened this issue Nov 23, 2023 · 3 comments

Comments

@ndr-brt
Copy link

ndr-brt commented Nov 23, 2023

Hey, great work here so far!

It would be great to have a shortcut to focus the terminal, currently it's possible from the main menu but it's quite annoying to do it with the mouse.

@tom-power
Copy link
Contributor

true story there's an action for x-terminal-reloaded:unfocus, but not x-terminal-reloaded:focus, wonder if it was on purpose or just missed?

I use window:toggle-bottom-dock for this btw so didn't know, might work for you in the meantime?

@ndr-brt
Copy link
Author

ndr-brt commented Nov 24, 2023

putting this in the keymap.cson almost did the job:

'body':
  'alt-f12': 'window:toggle-bottom-dock'

the problem is that keymap does not work when the terminal has the focus, the x-terminal-reloaded:unfocus works only from the command menu (not with the shortcut) and I'm not sure where the focus goes, surely not on the editor (edit, looking at the code, the focus is given to the whole workspace).
Isn't there a way to give the focus to the latest component that had it?

@tom-power
Copy link
Contributor

don't know a way to find the last component, but could just use atom.workspace.getActiveTextEditor() and change focus to the editor, notice that's what happens with window:toggle-bottom-dock

for the keybinding xterm.js is swallowing alt-f12 right? I use a ctrl-` which works, though then run into this

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