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

Unable to apply or autoload any key mappings #716

Closed
alastair1616 opened this issue May 26, 2023 · 5 comments
Closed

Unable to apply or autoload any key mappings #716

alastair1616 opened this issue May 26, 2023 · 5 comments

Comments

@alastair1616
Copy link

I was unable to apply or autoload on a fresh install of input-remapper on Arch Linux. Whenever I tried to apply a mapping I'd get the following error:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/inputremapper/gui/user_interface.py", line 256, in <lambda>
    "clicked", lambda *_: self.controller.start_injecting()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/inputremapper/gui/controller.py", line 627, in start_injecting
    if self.data_manager.active_preset.dangerously_mapped_btn_left():
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/inputremapper/configs/preset.py", line 239, in dangerously_mapped_btn_left
    if (ecodes.EV_KEY, ecodes.BTN_LEFT) not in [
        ^^^^^^
NameError: name 'ecodes' is not defined

I was able to resolve the problem by manually adding:
from evdev import ecodes
to:
/usr/lib/python3.11/site-packages/inputremapper/configs/preset.py

@arlarzelere3
Copy link

I had the same problem, and the same solution listed above fixed it.

@Lcchy
Copy link

Lcchy commented May 26, 2023

Same for me!

@shawarden
Copy link
Contributor

Same issue, same fix.

@joaovitorpessoa
Copy link

Almost the same solution here...

I added from evdev import ecodes in /usr/lib/python3/dist-packages/inputremapper/configs/preset.py

Poldovico added a commit to Poldovico/input-remapper that referenced this issue May 31, 2023
import a missing? dependency that made it impossible to apply presets in certain configurations
@Poldovico
Copy link
Contributor

same issue on garuda KDE with Wayland, same fix, made the smallest PR ever just adding the line to the file.
No idea if there's a reason it shouldn't be fixed that way.

sezanzeb pushed a commit that referenced this issue May 31, 2023
import a missing dependency that made it impossible to apply presets in certain configurations
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

7 participants