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

"Delete Line" Keybinding does not work #7888

Closed
tsmaeder opened this issue May 26, 2020 · 7 comments · Fixed by #7890
Closed

"Delete Line" Keybinding does not work #7888

tsmaeder opened this issue May 26, 2020 · 7 comments · Fixed by #7890
Assignees
Labels
bug bugs found in the application keybindings issues related to keybindings tasks issues related to the task system

Comments

@tsmaeder
Copy link
Contributor

Bug Description:

The default shortcut for "delete line" (ctrl-shift-k) does not work

Steps to Reproduce:

  1. Open any editor
  2. Press shift-ctrl-k
  3. Observe: nothing happens

Additional Information

  • Operating System: Windows 10, FF and chromium
  • Theia Version: master
@tsmaeder tsmaeder added bug bugs found in the application keybindings issues related to keybindings labels May 26, 2020
@tsmaeder
Copy link
Contributor Author

I can rebind the command to another keybinding and it works, so it seem it's not the command that's broken.

@kittaakos
Copy link
Contributor

kittaakos commented May 26, 2020

I tried it on macOS to see whether it is a Windows-only issue; it isn't. We incorrectly execute the Run Last Task command which fails, by the way:

root ERROR Failed to execute command: Error: The command 'task:run:last' cannot be executed. There are no active handlers available for the command. (args: [null])
    at CommandRegistry.<anonymous> (http://localhost:3000/bundle.js:134855:45)
    at step (http://localhost:3000/bundle.js:134624:23)
    at Object.next (http://localhost:3000/bundle.js:134605:53)
    at http://localhost:3000/bundle.js:134599:71
    at new Promise (<anonymous>)
    at ../../packages/core/lib/common/command.js.__awaiter (http://localhost:3000/bundle.js:134595:12)
    at CommandRegistry.../../packages/core/lib/common/command.js.CommandRegistry.executeCommand (http://localhost:3000/bundle.js:134837:16)
    at KeybindingRegistry.../../packages/core/lib/browser/keybinding.js.KeybindingRegistry.executeKeyBinding (http://localhost:3000/bundle.js:111915:38)
    at KeybindingRegistry.../../packages/core/lib/browser/keybinding.js.KeybindingRegistry.run (http://localhost:3000/bundle.js:112007:22)
    at HTMLDocument.<anonymous> (http://localhost:3000/bundle.js:110218:35)

@akosyakov akosyakov self-assigned this May 26, 2020
@akosyakov akosyakov added the tasks issues related to the task system label May 26, 2020
@akosyakov
Copy link
Member

The task extension depends on the monaco extension, so it registers keybindings afterwards. Since we aligned with VS Code for keybindings resolution, a keybinding registered later for the same scope has a higher priority now. The fix is to add a proper when closure or remove a keybinding in the task extension. I will do the former.

It was working before because we treated keybindings with context property to be of higher priority regardless of order registration or scopes.

akosyakov added a commit to akosyakov/theia that referenced this issue May 26, 2020
…ybinding

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit to akosyakov/theia that referenced this issue May 26, 2020
…ybinding

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
@tsmaeder
Copy link
Contributor Author

tsmaeder commented May 26, 2020

The keybinding for "run last task" shows up as "ctrlcmd+shift+k", not "ctrl+shift+k" in the keybindings UI. Not sure what the difference is.

@akosyakov
Copy link
Member

The keybinding for "run last task" shows up as "ctrlcmd+shift+k", not "ctrl+shift+k" in the keybindings UI. Not sure what the difference is.

I think it is correct, we detect your keyboard layout and then resolves the keybinding against it.

@tsmaeder
Copy link
Contributor Author

Hmh...I don't see a "ctrlcmd" key on my keyboard. Is that like "Alt-Gr"?

@akosyakov
Copy link
Member

Hmh...I don't see a "ctrlcmd" key on my keyboard. Is that like "Alt-Gr"?

It is ctrl on linux and windows, and cmd on mac.

akosyakov added a commit that referenced this issue May 26, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application keybindings issues related to keybindings tasks issues related to the task system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants