autokey / autokey-python2

Legacy Python 2 version of AutoKey, the desktop automation utility for Linux and X11.
GNU General Public License v3.0
207 stars 19 forks source link

NP_ENTER key missing & "<enter>" converted XK_KP_Enter #44

Closed ghost closed 7 years ago

ghost commented 8 years ago

Hello,

Currently, all "enter" type keys are being mapped to XK_KP_Enter. This is bad since certain applications distinguish between the main enter key and the keypad's enter key. For instance graphical terminals (e.g. gnome-terminal) do and so do certain terminal programs such as vim (in certain cases) and man. As a result, these programs will not behave properly when they receive KP_Enter.

This can be fixed easily by simply adding a new entry to Key class in iomediator.py:

NP_ENTER = "<np_enter>"

and changing all XK_KP_Enter entries to map to Key.NP_ENTER instead of Key.ENTER in interface.py.

I'm not submitting a pull request directly since I don't have the proper dependencies to run the git version of autokey on my debian jessie system and this is a very simple fix.

josephj11 commented 8 years ago

Nothing like a new problem with the solution already provided! Thank you.

If we ever get an active developer again, we'll put this in.