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

How to change the default key-bindings #22

Open
KhalidAHamad opened this issue Apr 15, 2020 · 3 comments
Open

How to change the default key-bindings #22

KhalidAHamad opened this issue Apr 15, 2020 · 3 comments

Comments

@KhalidAHamad
Copy link

Hi,
I am using a 65% keyboard with no number pad. How can I change the default key-bindings to use the regular numbers?

Thanks in advance!

@danielcr10
Copy link

I would like to know too.

Thanks !

@SR-G
Copy link

SR-G commented Jun 6, 2020

Ok found it after giving a look at the code.
The bindings are "GTK constants". The constants can probably be found in the GTK code, i've just quickly found them online here : https://pageperso.lif.univ-mrs.fr/~edouard.thiel/ez-draw-gtk/demo4g.c (just use the various constants written in the same way than "KP_1" (KP = KeyPad), for example "Num_Lock", or "1", "a", ...).

So you have to edit the default configuration, for example to use CTRL + ALT + 1 (numeric characters) ... (edit your ~/.config/pygrid.json configuration file) :

  "keys": {
    "accelerator": "<Ctrl><Alt>",
    "commands": {
      "0": "maximize",
      "1": "bottomleft",
      "2": "bottom",
      "3": "bottomright",
      "4": "left",
      "5": "middle",
      "6": "right",
      "7": "topleft",
      "8": "top",
      "9": "topright",
      "Return": "cycle-monitor"
    }
  }

(the accelerator config has also to be changed : i have no idea what the default value <Ctrl><Mod1><Mod2> means ...

@Salvatore-tech
Copy link

Ok found it after giving a look at the code.
The bindings are "GTK constants". The constants can probably be found in the GTK code, i've just quickly found them online here : https://pageperso.lif.univ-mrs.fr/~edouard.thiel/ez-draw-gtk/demo4g.c (just use the various constants written in the same way than "KP_1" (KP = KeyPad), for example "Num_Lock", or "1", "a", ...).

So you have to edit the default configuration, for example to use CTRL + ALT + 1 (numeric characters) ... (edit your ~/.config/pygrid.json configuration file) :

  "keys": {
    "accelerator": "<Ctrl><Alt>",
    "commands": {
      "0": "maximize",
      "1": "bottomleft",
      "2": "bottom",
      "3": "bottomright",
      "4": "left",
      "5": "middle",
      "6": "right",
      "7": "topleft",
      "8": "top",
      "9": "topright",
      "Return": "cycle-monitor"
    }
  }

(the accelerator config has also to be changed : i have no idea what the default value <Ctrl><Mod1><Mod2> means ...

Not working for me, i'd like to set this configuration: CTRL + SHIFT + character (on the left side of the keyboard, such as 'a', 's', 'd' ecc...). I tried your configuration but it seems to not recognise the input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants