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

Preset does not autoload #926

Closed
Namlev1 opened this issue Jul 24, 2024 · 5 comments
Closed

Preset does not autoload #926

Namlev1 opened this issue Jul 24, 2024 · 5 comments

Comments

@Namlev1
Copy link

Namlev1 commented Jul 24, 2024

Arch Linux with aur/input-remapper-git 2.0.1.r0.ga012746a-1 package.

I have a preset for keyboard, with autoload set to true (both GUI and in config file). The preset is not loaded automatically: I need to open the GUI app and press apply to make it work. I believe the service is running, but it does not apply the preset.

10:08:38 is the moment when I open the GUI and later apply the preset manually.

input-remapper.service - Service to inject keycodes without the GUI application
     Loaded: loaded (/usr/lib/systemd/system/input-remapper.service; enabled; preset: disabled)
     Active: active (running) since Wed 2024-07-24 10:07:40 CEST; 14min ago
 Invocation: 1e59e20572094d2daeb90cdfd333e88f
   Main PID: 598 (input-remapper-)
      Tasks: 6 (limit: 18348)
     Memory: 44.3M (peak: 44.8M)
        CPU: 443ms
     CGroup: /system.slice/input-remapper.service
             ├─ 598 /usr/bin/python3 /usr/bin/input-remapper-service
             ├─ 654 /usr/bin/python3 /usr/bin/input-remapper-service
             └─2920 /usr/bin/python3 /usr/bin/input-remapper-service
 
lip 24 10:07:40 namlev-arch input-remapper-service[598]: input-remapper-service 2.0.1 f5151aab27ae0e7d8b1f0c80ce92a718e3a86e71 https://github.com/sezanzeb/>
lip 24 10:07:40 namlev-arch input-remapper-service[598]: python-evdev 1.7.1
lip 24 10:07:40 namlev-arch systemd[1]: Started Service to inject keycodes without the GUI application.
lip 24 10:08:38 namlev-arch input-remapper-service[598]: Loaded config from "/home/namlev/.config/input-remapper-2/config.json"
lip 24 10:08:53 namlev-arch input-remapper-service[598]: Loaded config from "/home/namlev/.config/input-remapper-2/config.json"
lip 24 10:08:53 namlev-arch input-remapper-service[598]: Request to start injecting for "AT Translated Set 2 keyboard"
lip 24 10:08:54 namlev-arch input-remapper-service[598]: Found "Video Bus", "AT Translated Set 2 keyboard", "Wireless hotkeys", "HP WMI hotkeys", "SYNA32AC>
lip 24 10:08:54 namlev-arch input-remapper-service[598]: Loading preset from "/home/namlev/.config/input-remapper-2/presets/AT Translated Set 2 keyboard/ne>
lip 24 10:08:54 namlev-arch input-remapper-service[2920]: Starting injecting the preset for "AT Translated Set 2 keyboard"

config.json:

{
    "version": "2.0.1",
    "autoload": {
        "AT Translated Set 2 keyboard": "new preset 2"
    }
}

preset config:

[
    {
        "input_combination": [
            {
                "type": 1,
                "code": 29,
                "origin_hash": "18ab2ccaa82365e4b599de26f5f8fce3"
            },
            {
                "type": 1,
                "code": 38,
                "origin_hash": "18ab2ccaa82365e4b599de26f5f8fce3"
            }
        ],
        "target_uinput": "keyboard",
        "output_symbol": "KEY_DOWN",
        "mapping_type": "key_macro"
    },
    {
        "input_combination": [
            {
                "type": 1,
                "code": 29,
                "origin_hash": "18ab2ccaa82365e4b599de26f5f8fce3"
            },
            {
                "type": 1,
                "code": 42,
                "origin_hash": "18ab2ccaa82365e4b599de26f5f8fce3"
            },
            {
                "type": 1,
                "code": 38,
                "origin_hash": "18ab2ccaa82365e4b599de26f5f8fce3"
            }
        ],
        "target_uinput": "keyboard",
        "output_symbol": "KEY_UP",
        "mapping_type": "key_macro"
    }
]
@terminalpain
Copy link

Did you fix? for autoload to work for me I had to type this:

sudo systemctl enable input-remapper

in to a terminal.

@Namlev1
Copy link
Author

Namlev1 commented Aug 5, 2024

@terminalpain Based on the systemctl status output the service is already enabled. It just doesn't apply the auto-load settings, although input-remapper is running in the background.

@terminalpain
Copy link

I should of also mentioned that this was in KDE, autoload preset would work on boot after that command. I now use Hyprland which I get the same issue as you and using the command doesn't fix it. I have asked around on Discord and most ppl say it should work. I have given up and I just added the app to my startup list and I hit apply each boot.

@Namlev1
Copy link
Author

Namlev1 commented Aug 6, 2024

I think I had it working on KDE back then, now I am also having this problem on Wayland (sway)

@Namlev1
Copy link
Author

Namlev1 commented Aug 7, 2024

I quited on this application because it is not developed anymore (I believe so).
I've switched to https://github.com/wez/evremap

After install I created config file for my remaps:

device_name = "AT Translated Set 2 keyboard"

[[remap]]
input = ["KEY_LEFTCTRL","KEY_LEFTSHIFT", "KEY_L"]
output = ["KEY_UP"]

[[remap]]
input = ["KEY_LEFTCTRL", "KEY_L"]
output = ["KEY_DOWN"]

Then added this line to file with sudo visudo

yourusername ALL=(ALL) NOPASSWD: /usr/bin/evremap remap /home/yourusername/.config/evremap/config.toml

(Change yourusername)
Then added this line to my sway config

exec sudo evremap remap ~/.config/evremap/config.toml

evremap needs root privilages, so I edited sudo file so that this command doesn't require password prompt.

@Namlev1 Namlev1 closed this as completed Aug 7, 2024
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

2 participants