Configurable keyboard shortcuts in the editor

#1

Thanks to a community contribution from Slack user Saikyun we now have a first version of configurable keyboard shortcuts in the editor. With the latest editor update you’ll find a “Path to custom keymap” option in the Preferences window:

23

And instructions:

15 Likes

#2

:open_mouth: No way…
Best Feature 2020.

But…I’m having some issues with it. It seems like there’s a problem with mapping single keys. I tried to remap the keys used to switch transform tools (move-tool, scale-tool, rotate-tool). Using W or E or A always seems to work, no matter which tool they’re used for, but other letters like U, L, M, or Q don’t work. Though they work fine if I put add Alt to them. I’m on Windows.

6 Likes

#3

Tear of joy!

1 Like

#4

Are those the command exposed to the shortcuts or there’s more?
Looking to bind build html5 :stuck_out_tongue:

1 Like

#5

Yeah, now we need aaaaallll the other commands. “Add Component File” and “Add Game Object File” are biggies for me.

0 Likes

#6

In the source code for keymaps, there’s this piece of code:

;; These are only (?) used in contexts where there is no text field
;; interested in the actual typable input.
(def ^:private default-allowed-typable-shortcuts
  #{"A"         ; :add
    "E"         ; :rotate-tool
    "F"         ; :frame-selection
    "R"         ; :scale-tool
    "W"         ; :move-tool
    "Shift+A"   ; :add-secondary
    "Shift+E"}) ; :erase-tool

To my understanding, the reason for this seem to be that the keymap I opened up to customization seem to work globally, even when in a text field. While commands that can be interpreted as text (e.g. “A”) can’t be global hotkeys, since then you wouldn’t be able to type those characters. :slight_smile:

5 Likes

#7

Got it. Makes sense. Thanks for the explanation.

Well, being able to change them at all is a big step in the right direction anyway. Thanks for your efforts!

2 Likes