keyboards icon indicating copy to clipboard operation
keyboards copied to clipboard

added faster xmodmap alternative

Open Raekh opened this issue 1 year ago • 3 comments

As explained in the README in xmodmap, it basically emits an event for every key remap, leading to the system sometimes hanging up.

The solution proposed here is from a stackexchange discussion, where the workaround is to create a compilable code from the current mapping, that would apply this layout when executed while only emitting the events once.

Raekh avatar Apr 28 '23 22:04 Raekh

+ ~/keyboard on master ➜ gcc xmodmap_alternative.c -lX11

+ ~/keyboard on  master ➜ ls
a.out  README.md  xmodmap_alternative.c

+ ~/keyboard on  master ➜ xmodmap a.out
xmodmap:  unknown command on line a.out:1
xmodmap:  unknown command on line a.out:6
xmodmap:  unknown command on line a.out:7
xmodmap:  unknown command on line a.out:8
xmodmap:  unknown command on line a.out:9
xmodmap:  unknown command on line a.out:10
xmodmap:  6 errors encountered, aborting.

gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

It works for you as is?

Nikola-Milovic avatar Sep 05 '23 05:09 Nikola-Milovic

The output should be a.c instead of a.out. Then you can run gcc on it again and this time it creates the executable you can run

On Tue, 5 Sept 2023, 07:52 Nikola Milovic, @.***> wrote:

  • ~/keyboard on master ➜ gcc xmodmap_alternative.c -lX11
  • ~/keyboard on master ➜ lsa.out README.md xmodmap_alternative.c
  • ~/keyboard on master ➜ xmodmap a.outxmodmap: unknown command on line a.out:1xmodmap: unknown command on line a.out:6xmodmap: unknown command on line a.out:7xmodmap: unknown command on line a.out:8xmodmap: unknown command on line a.out:9xmodmap: unknown command on line a.out:10xmodmap: 6 errors encountered, aborting.

gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

It works for you as is?

— Reply to this email directly, view it on GitHub https://github.com/ThePrimeagen/keyboards/pull/14#issuecomment-1705983860, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFYZFQIG24PKM4PCVMF6WHTXY24YNANCNFSM6AAAAAAXPYXWDM . You are receiving this because you authored the thread.Message ID: @.***>

Raekh avatar Sep 05 '23 18:09 Raekh

Doesn't work for me, can you post your versions and setup? The commands are rather simple I doubt I messed something up

Nikola-Milovic avatar Sep 06 '23 04:09 Nikola-Milovic