Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

> Fixes [atom/teletype#208](https://github.com/atom/teletype/issues/208) #23173

Closed
pomnt opened this issue Oct 31, 2021 · 2 comments
Closed

> Fixes [atom/teletype#208](https://github.com/atom/teletype/issues/208) #23173

pomnt opened this issue Oct 31, 2021 · 2 comments

Comments

@pomnt
Copy link

pomnt commented Oct 31, 2021

Fixes atom/teletype#208

This is similar to what we do for macOS keymaps:

atom/keymaps/darwin.cson

Lines 108 to 163 in 6cbc998

'atom-text-editor':
# Platform Bindings
'alt-left': 'editor:move-to-beginning-of-word'
'alt-right': 'editor:move-to-end-of-word'
'alt-shift-left': 'editor:select-to-beginning-of-word'
'alt-shift-right': 'editor:select-to-end-of-word'
# Apple Specific
'cmd-backspace': 'editor:delete-to-beginning-of-line'
'cmd-shift-backspace': 'editor:delete-to-beginning-of-line'
'cmd-delete': 'editor:delete-to-end-of-line'
'ctrl-shift-a': 'editor:select-to-first-character-of-line'
'ctrl-shift-e': 'editor:select-to-end-of-line'
'cmd-left': 'editor:move-to-first-character-of-line'
'cmd-right': 'editor:move-to-end-of-screen-line'
'cmd-shift-left': 'editor:select-to-first-character-of-line'
'cmd-shift-right': 'editor:select-to-end-of-line'
'alt-backspace': 'editor:delete-to-beginning-of-word'
'alt-delete': 'editor:delete-to-end-of-word'
'ctrl-a': 'editor:move-to-first-character-of-line'
'ctrl-e': 'editor:move-to-end-of-line'
'ctrl-k': 'editor:cut-to-end-of-line'
# Atom Specific
'ctrl-shift-w': 'editor:select-word'
'cmd-ctrl-left': 'editor:move-selection-left'
'cmd-ctrl-right': 'editor:move-selection-right'
'cmd-shift-V': 'editor:paste-without-reformatting'
# Emacs
'alt-f': 'editor:move-to-end-of-word'
'alt-ctrl-f': 'editor:move-to-next-subword-boundary'
'alt-shift-f': 'editor:select-to-end-of-word'
'alt-ctrl-shift-f': 'editor:select-to-next-subword-boundary'
'alt-b': 'editor:move-to-beginning-of-word'
'alt-ctrl-b': 'editor:move-to-previous-subword-boundary'
'alt-shift-b': 'editor:select-to-beginning-of-word'
'alt-ctrl-shift-b': 'editor:select-to-previous-subword-boundary'
'alt-h': 'editor:delete-to-beginning-of-word'
'alt-ctrl-h': 'editor:delete-to-beginning-of-subword'
'alt-d': 'editor:delete-to-end-of-word'
'alt-ctrl-d': 'editor:delete-to-end-of-subword'
# Sublime Parity
'cmd-a': 'core:select-all'
'cmd-alt-p': 'editor:log-cursor-scope'
'cmd-k cmd-u': 'editor:upper-case'
'cmd-k cmd-l': 'editor:lower-case'
'cmd-l': 'editor:select-line'
'ctrl-t': 'editor:transpose'
'ctrl-alt-left': 'editor:move-to-previous-subword-boundary'
'ctrl-alt-right': 'editor:move-to-next-subword-boundary'
'ctrl-alt-shift-left': 'editor:select-to-previous-subword-boundary'
'ctrl-alt-shift-right': 'editor:select-to-next-subword-boundary'
'ctrl-alt-backspace': 'editor:delete-to-beginning-of-subword'
'ctrl-alt-delete': 'editor:delete-to-end-of-subword'

And would fix an issue teletype users are noticing when using editor commands in the popover. Since the popover is located outside the workspace (i.e. because it is a tooltip), keyboard shortcuts are not working for Linux and Windows users. I assume this is an issue with every package that attempts to use an editor outside the atom-workspace element.

@atom/maintainers: what do you think?

/cc: @AlexWayfer, who originally reported the issue on atom/teletype.

Originally posted by @pomnt in #16206 (comment)

@pomnt
Copy link
Author

pomnt commented Oct 31, 2021

Fixes atom/teletype#208
This is similar to what we do for macOS keymaps:

atom/keymaps/darwin.cson

Lines 108 to 163 in 6cbc998

'atom-text-editor':
# Platform Bindings
'alt-left': 'editor:move-to-beginning-of-word'
'alt-right': 'editor:move-to-end-of-word'
'alt-shift-left': 'editor:select-to-beginning-of-word'
'alt-shift-right': 'editor:select-to-end-of-word'
# Apple Specific
'cmd-backspace': 'editor:delete-to-beginning-of-line'
'cmd-shift-backspace': 'editor:delete-to-beginning-of-line'
'cmd-delete': 'editor:delete-to-end-of-line'
'ctrl-shift-a': 'editor:select-to-first-character-of-line'
'ctrl-shift-e': 'editor:select-to-end-of-line'
'cmd-left': 'editor:move-to-first-character-of-line'
'cmd-right': 'editor:move-to-end-of-screen-line'
'cmd-shift-left': 'editor:select-to-first-character-of-line'
'cmd-shift-right': 'editor:select-to-end-of-line'
'alt-backspace': 'editor:delete-to-beginning-of-word'
'alt-delete': 'editor:delete-to-end-of-word'
'ctrl-a': 'editor:move-to-first-character-of-line'
'ctrl-e': 'editor:move-to-end-of-line'
'ctrl-k': 'editor:cut-to-end-of-line'
# Atom Specific
'ctrl-shift-w': 'editor:select-word'
'cmd-ctrl-left': 'editor:move-selection-left'
'cmd-ctrl-right': 'editor:move-selection-right'
'cmd-shift-V': 'editor:paste-without-reformatting'
# Emacs
'alt-f': 'editor:move-to-end-of-word'
'alt-ctrl-f': 'editor:move-to-next-subword-boundary'
'alt-shift-f': 'editor:select-to-end-of-word'
'alt-ctrl-shift-f': 'editor:select-to-next-subword-boundary'
'alt-b': 'editor:move-to-beginning-of-word'
'alt-ctrl-b': 'editor:move-to-previous-subword-boundary'
'alt-shift-b': 'editor:select-to-beginning-of-word'
'alt-ctrl-shift-b': 'editor:select-to-previous-subword-boundary'
'alt-h': 'editor:delete-to-beginning-of-word'
'alt-ctrl-h': 'editor:delete-to-beginning-of-subword'
'alt-d': 'editor:delete-to-end-of-word'
'alt-ctrl-d': 'editor:delete-to-end-of-subword'
# Sublime Parity
'cmd-a': 'core:select-all'
'cmd-alt-p': 'editor:log-cursor-scope'
'cmd-k cmd-u': 'editor:upper-case'
'cmd-k cmd-l': 'editor:lower-case'
'cmd-l': 'editor:select-line'
'ctrl-t': 'editor:transpose'
'ctrl-alt-left': 'editor:move-to-previous-subword-boundary'
'ctrl-alt-right': 'editor:move-to-next-subword-boundary'
'ctrl-alt-shift-left': 'editor:select-to-previous-subword-boundary'
'ctrl-alt-shift-right': 'editor:select-to-next-subword-boundary'
'ctrl-alt-backspace': 'editor:delete-to-beginning-of-subword'
'ctrl-alt-delete': 'editor:delete-to-end-of-subword'

And would fix an issue teletype users are noticing when using editor commands in the popover. Since the popover is located outside the workspace (i.e. because it is a tooltip), keyboard shortcuts are not working for Linux and Windows users. I assume this is an issue with every package that attempts to use an editor outside the atom-workspace element.
@atom/maintainers: what do you think?
/cc: @AlexWayfer, who originally reported the issue on atom/teletype.

Originally posted by @pomnt in #16206 (comment)

@darangi
Copy link
Contributor

darangi commented Nov 22, 2021

Thanks for reaching out!

We require the template to be filled out on all new issues and pull requests. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.

Thanks for understanding and meeting us half way 😀

@darangi darangi closed this as completed Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants