Re: xmodmap doesn't before pressing any button keyboard
Akib Azmain Turja writes: > I have setup my Emacs iwth EXWM. I am trying to remap several keys to > avoid repetitive strain injury (RSI), also known as Emacs pinky. To > accomplish that, I am using xmodmap. It works perfectly when I invoke > the command directly. However it doesn't work when I put it in Emacs > startup files. After several days of research, I discovered that > xmodmap only works when I have pressed atleast one key in my keyboard. > Any solutions? Hi Akib, I also use Emacs with EXWM. To prevent Emacs pinky, I add the following lines to my $HOME/.xsession file: === # Set keyboard repeat rate xset r rate 200 60 # Change Caps Lock to Ctrl setxkbmap -option "ctrl:nocaps" setxkbmap -option "terminate:ctrl_alt_bksp" === Remember to put `exwm` at the end of your $HOME/.xsession file to launch your window manager when X starts up. Happy hacking, Gary -- GPG Key ID: 7BC158ED Use `gpg --search-keys lambdatronic' to find me Protect yourself from surveillance: https://emailselfdefense.fsf.org === () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments Why is HTML email a security nightmare? See https://useplaintext.email/ Please avoid sending me MS-Office attachments. See http://www.gnu.org/philosophy/no-word-attachments.html
Re: xmodmap doesn't before pressing any button keyboard
On 18/07/2021 15:41, Akib Azmain Turja wrote: I have setup my Emacs iwth EXWM. I am trying to remap several keys to avoid repetitive strain injury (RSI), also known as Emacs pinky. To accomplish that, I am using xmodmap. It works perfectly when I invoke the command directly. However it doesn't work when I put it in Emacs startup files. After several days of research, I discovered that xmodmap only works when I have pressed atleast one key in my keyboard. Any solutions? I started looking at this, following your email, and came across the following: https://librehacker.com/2020/12/23/caps-lock-as-ctrl-guix-system-configuration/ This swaps the ctrl key with the capslock key. This could possibly be expanded to cover other changes (I am not sure what others you are looking at). Using the keyboard-layout option should mean your changes are working in the different virtual terminals as well as any X session.
Re: xmodmap doesn't before pressing any button keyboard
I also use EXWM, and made good experiences with setting keyboard remapping options directly in my system's config.scm (via the :options of keyboard-layout, which sets XKB options; see the manual for examples: https://guix.gnu.org/de/manual/en/html_node/Keyboard-Layout.html). However, I just use it to remap capslock to escape (for vim/evil-mode), so if you need more, I'm not sure if it'll work for you — I've never used xmodmap, I'm not sure if you can do everything using XKB options that xmodmap can do — at first glance xmodmap seems more general. ~stuebinm On 18.07.21 16:41, Akib Azmain Turja wrote: I have setup my Emacs iwth EXWM. I am trying to remap several keys to avoid repetitive strain injury (RSI), also known as Emacs pinky. To accomplish that, I am using xmodmap. It works perfectly when I invoke the command directly. However it doesn't work when I put it in Emacs startup files. After several days of research, I discovered that xmodmap only works when I have pressed atleast one key in my keyboard. Any solutions? OpenPGP_signature Description: OpenPGP digital signature
Re: xmodmap doesn't before pressing any button keyboard
hello! you are using Guix-system, right? you might want to add some extra X.org-configuration to your systems declaration. for example, if you're using the Slim login-manager, here's a snippet from my Guix-system-declaration which makes X.org map caps-lock to ctrl while using the german keyboard layout: --8<---cut here---start->8--- (slim-service #:startx (xorg-start-command #:configuration-file (xorg-configuration-file #:extra-config (list "Section \"InputClass\" Identifier \"Keyboard Defaults\" MatchIsKeyboard \"on\" Option \"XkbLayout\" \"de\" Option \"XkbOptions\" \"ctrl:nocaps\" EndSection" --8<---cut here---end--->8--- how do you start EXWM? if you start it with an ~/.xsession file, that's also a good place to put your keyboard-initialization code in, as far as i know. ciao mekeor 2021-07-18 / 20:41 / akib8...@gmail.com: > [[PGP Signed Part:Undecided]] > I have setup my Emacs iwth EXWM. I am trying to remap several keys to > avoid repetitive strain injury (RSI), also known as Emacs pinky. To > accomplish that, I am using xmodmap. It works perfectly when I invoke > the command directly. However it doesn't work when I put it in Emacs > startup files. After several days of research, I discovered that > xmodmap only works when I have pressed atleast one key in my keyboard. > Any solutions?
xmodmap doesn't before pressing any button keyboard
I have setup my Emacs iwth EXWM. I am trying to remap several keys to avoid repetitive strain injury (RSI), also known as Emacs pinky. To accomplish that, I am using xmodmap. It works perfectly when I invoke the command directly. However it doesn't work when I put it in Emacs startup files. After several days of research, I discovered that xmodmap only works when I have pressed atleast one key in my keyboard. Any solutions? -- Akib Azmain Turja This message is signed by me with my GnuPG key. It's fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 See https://emailselfdefense.fsf.org/ to learn more and protect your emails and yourself from surveillance. signature.asc Description: PGP signature