How to Edit Hotkeys?

I've read around a bit on the subject and figured out I have to open the keybindings json file located in the AppData folder. The problem is, there's only a pair of brackets within the file and nothing more. It's empty!

So, I tried to add my own by reading through this post: https://pyxeledit.com/forum/discussion/370/more-keyboard-shortcuts

Here's the code I tried,
[{"action":"Pen","keyString":"E"},{}]

After launching I noticed that the Eraser is no longer bound to E, but that the pen tool is still bound to D.

Any help would be appreciated.

Comments

  • CandyFaceCandyFace Posts: 620
    edited April 2016
    Hi activelylit

    Yeah it seems that with the newest release the keybinding.json is almost empty.
    There is a readme in the folder though, where it is stated that if you want to add custom bindings, then it should look something like this.

    [
        {
          "keyString": "D",
          "action": "pen_tool_action"
        }
    ]

    I haven't tried it myself though, so I can't confirm if it works.

  • Oh my, I completely missed that Readme file! This answers my question, thank you very much CandyFace.
  • Can confirm that the custom bindings do work.
  • BoomyBoomy Posts: 3
    edited April 2016
    I need help with this someone please make a guide, this is getting me furiously salty.
    Case is I'm left-handed so anything involving the right side of the keyboard would have me putting my drawing tool away and in effects takes no less time than navigating the mouse to the button. It's actually kinda surprising that a 0.4 bet has neither key rebinds nor a proper guide to file editing. Shortcuts in programs are the only thing in the world that makes me feel disabled.

    So far all my struggles end up with the program telling me that it doesn't understand keybindings.json and will ignore it. I need to write down all the tools to the numpad numbers, including things like "transform selected" and I need to get the undo action under the "\" key.
  • CandyFaceCandyFace Posts: 620
    edited April 2016
    @Boomy sorry to hear you're having problems, you should post your current config, then I'll look into what's causing the problem. I noticed that there was a "," missing in the template from the readme file, this was probably what was causing you problems. Beside that, you also have to write the key strings correctly, to be recognized. Here's a few things about the structure.

    This is how the file looked from the readme, though you'll notice that a comma is missing at the end of "keyString": "TAB", The comma should only be there if you're adding more to the config after the line.

    [
        { 
          "keyString": "D", 
          "action": "pen_tool_action" 
        }, <- Here is a comma because there's another key binding below
        {
          "keyString": "TAB" <- Here the comma is missing
          "action": "prev_document_action",
          "shiftKey": true,
          "ctrlKey": true,
          "altKey": false <- here there is no comma because it's the last thing before the closing }
        } <- Here is no comma because we don't intend to add more keybindings.
    ]

    The fixed version should look like this:

    [
        { 
          "keyString": "D", 
          "action": "pen_tool_action" 
        },
        {
          "keyString": "TAB",
          "action": "prev_document_action",
          "shiftKey": true,
          "ctrlKey": true,
          "altKey": false
        }
    ]

    I didn't know how to bind to the Numpad keys, but was able to find documentation for this here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/Keyboard.html
    So if you for example wanted to bind something to Numpad 1, then you would write it like this.

    [
        { 
          "keyString": "NUMPAD_1", 
          "action": "pen_tool_action" 
        },
        {
          "keyString": "NUMPAD_2",
          "action": "eraser_tool_action"
        }
    ]

    If you still get an error, it's likely you missed a comma or has a comma too much somewhere.
    The available actions you can bind to, can be found in the readme. 

  • BoomyBoomy Posts: 3
    @CandyFace
    Thank you for your help! While it was true that I was missing a bunch of commas, it sadly also turned out that binding keys to symbols like "\" or numpad numbers makes the keybindings unreadable to the program, thus it ignores the keybindings.json file as if it was corrupted. I hope it will be resolved a few updates down the line.
  • CandyFaceCandyFace Posts: 620
    edited April 2016
    Did you figure it out then? As I showed above it is possible to bind to numpad keys, and you should be able to bind to backslash too by using "keyString": "BACKSLASH",
Sign In or Register to comment.