gillescastel/inkscape-shortcut-manager

i3wm mod key doesn't work

Closed this issue · 2 comments

Hello~
The inkscape-figure works pretty well. But after I installed shortcut manager, the file watcher doesn't work. In addition, all shortcuts for my i3wm doesn't work after I launch inkscape.
I'm looking for your help

Thank you.

== Edit: I found out a solution that works (for me, at least) ==
I too had this problem with i3wm, but realized that it didn't happen if I changed the mod key to be the Windows key (aka Super_L). I originally used the left Alt as a mod key

The solution for me was changing line 46 of main.py from:
self.inkscape.ungrab_key(self.string_to_keycode('Super_L'), X.AnyModifier, True)
to:
self.inkscape.ungrab_key(self.string_to_keycode('Alt_L'), X.AnyModifier, True)

If you are using yet another mod key, you can find out its name by running xev in a terminal and pressing the key while your mouse pointer is inside the white are. The terminal will show info about the key, including its name.

I hope this was of some help :D

== Original comment ==
Hi!
I know this is really not an answer, but I wanted to contribute with my experience on this.

I usually have the Alt key configured as the mod key in i3wm. In my case, too, it stopped working when I focused on an Inkscape window.
But after changing the i3wm mod key to the Windows key everything started working again, so my guess is that the portion of main.py concerned with "ungrabbing" mod keys doesn't recognize Alt for some reason. I maybe wrong, and in any case as of now I still don't know anything about Xlib, so I wouldn't know how to fix this, but maybe this will be of some use to others.

PS: Gilles, thank you so much for this, and more generally for the awesome vim/LaTeX/Inkscape setup you detailed in your blog. It cascaded into me learning a lot of new amazing stuff. Is there a way to buy you a coffee without using a credit card? Like PayPal, I have some credit there.

Hi @yhao21 and @isaiaismaele. The solution provided by @isaiaismaele should indeed fix this. I'm sorry for getting back on this so late. I will update the code to reflect this solution.

(PS: If you wish, you can donate via paypal here: castel.dev/paypal)