Does anyone have a IntelliJ or VSCode layer to share?

Curious if anyone has a layer customized for use with an IDE like IntelliJ or VSCode or Visual Studio?

I used to use a Logitech G13 gaming keypad for quick debugging in Visual Studio - each key was mapped to a different debugging command - step in/step over/step out/set breakpoint/disable breakpoint/etc. etc. Debugging would just fly with my left hand on the keypad and my right hand on my trackball.

I’m looking to do the same with layers with my brand new UHK but thought if someone else had a configuration I could start with that would be great.

Looking these days especially for IntelliJ and/or VSCode.

1 Like

Hi @davidbak

I’ve been using my UHK v1 & 2 for years w/ VScode & Jetbrains IDEs (even Fleet). Maybe this will give you some ideas:

I’ve ended up simplifying all my keymaps for IDEs so that they are easy to access using Alt+? or Ctrl+Alt+?.
And I ended up mapping Ctrl to “left caps lock” and Alt to “right enter”. This way I can easily access my shortcuts w/out having to do anything w/ Agent (except for remapping Ctrl + Alt). Let me know if you have any questions.

Here are some examples for VSCode. I can share the full JSON file as a gist if you would like.

  // Multiple cursors.
  {
    "key": "ctrl+j",
    "command": "editor.action.insertCursorBelow",
    "when": "editorTextFocus"
  },
  {
    "key": "alt+j",
    "command": "editor.action.addSelectionToNextFindMatch",
    "when": "editorFocus"
  },
  {
    "key": "alt+c",
    "command": "editor.action.addSelectionToNextFindMatch",
    "when": "editorFocus"
  },
  // Peek: https://stackoverflow.com/a/64217400/2085356
  {
    "key": "alt+g",
    "command": "togglePeekWidgetFocus",
    "when": "inReferenceSearchEditor || referenceSearchVisible"
  },
  {
    "key": "alt+b",
    "command": "editor.action.peekDefinition",
    // "command": "editor.action.peekImplementation",
    "when": "editorHasImplementationProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
  },
  {
    "key": "ctrl+shift+i",
    "command": "editor.action.peekDefinition",
    // "command": "editor.action.peekImplementation",
    "when": "editorHasImplementationProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
  },
  {
    "key": "ctrl+shift+down",
    "command": "editor.action.peekDefinition",
    "when": "editorHasDefinitionProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
  },
  {
    "key": "alt+shift+p",
    "command": "rust-analyzer.peekTests",
    "when": "editorTextFocus && !editorReadonly && editorLangId == rust"
  },

2 Likes

In IntelliJ I prefer using the IdeaVim plugin since all the programming for shortcuts are already there and the AceJump plugin. You can also assign debugging shortcuts in your .ideavimrc file

1 Like