writer icon indicating copy to clipboard operation
writer copied to clipboard

Hotkeys for linux

Open maxiy01 opened this issue 2 years ago • 3 comments

On linux I can't set up hotkeys, because only options available are '⌘ + .' and '⌥ + .', which I don't have on keyboard.

maxiy01 avatar Mar 02 '22 10:03 maxiy01

@maxiy01 on Windows/Linux you can use ctrl + ., also you can change the hotkeys according your own preferences by editing the keybindings.json file available on the command palette as "Keyboard Shortcuts".

e.g.: In my case I use the default shortcut for other stuffs and I don't want to change it so I updated my settings and the result is something like this

// Place your key bindings in this file to override the defaults
[
  {}, // custom shortcut
  {}, // ...
  {
    "key": "cmd+k cmd+.",
    "command": "docs.write",
    "when": "editorTextFocus"
  }
]

AgusRdz avatar May 02 '22 15:05 AgusRdz

The default when condition seems strange.

  {
    "key": "cmd+.",
    "command": "docs.write",
    "when": "editorTextFocus && config.docwriter.hotkey.mac == '⌘ + .' && editorLangId =~ /typescript|javascript|python|php|java|c|cpp|csharp|dart|ruby|go|rust/"
  }

If I change config.docwriter.hotkey.mac == '⌘ + . to, say, config.docwriter.hotkey.mac == '⌘ + ,' in settings.json, the old hot key is broken but the new one I set doesn't work either. How is this supposed to work?

janosh avatar Jan 12 '23 19:01 janosh

Ubuntu seems to be regarded as mac in this plug-in. If ALT+. cannot be used, you can consider adding it to keybinds.json

  {
    "key": "ALT+m",
    "command": "docs.write",
    "when": "editorTextFocus"
  }

SkywalkerJi avatar Apr 26 '24 01:04 SkywalkerJi