* Re: xmodmap doesn't before pressing any button keyboard
2021-07-18 14:41 xmodmap doesn't before pressing any button keyboard Akib Azmain Turja
@ 2021-07-18 16:09 ` stuebinm
2021-07-18 16:14 ` Mekeor Melire
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: stuebinm @ 2021-07-18 16:09 UTC (permalink / raw)
To: help-guix
[-- Attachment #1.1: Type: text/plain, Size: 1093 bytes --]
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?
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xmodmap doesn't before pressing any button keyboard
2021-07-18 14:41 xmodmap doesn't before pressing any button keyboard Akib Azmain Turja
2021-07-18 16:09 ` stuebinm
@ 2021-07-18 16:14 ` Mekeor Melire
2021-07-19 9:52 ` Paul Jewell
2021-07-20 15:30 ` Gary Johnson
3 siblings, 0 replies; 5+ messages in thread
From: Mekeor Melire @ 2021-07-18 16:14 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: help-guix
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 / akib8492@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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xmodmap doesn't before pressing any button keyboard
2021-07-18 14:41 xmodmap doesn't before pressing any button keyboard Akib Azmain Turja
2021-07-18 16:09 ` stuebinm
2021-07-18 16:14 ` Mekeor Melire
@ 2021-07-19 9:52 ` Paul Jewell
2021-07-20 15:30 ` Gary Johnson
3 siblings, 0 replies; 5+ messages in thread
From: Paul Jewell @ 2021-07-19 9:52 UTC (permalink / raw)
To: help-guix
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xmodmap doesn't before pressing any button keyboard
2021-07-18 14:41 xmodmap doesn't before pressing any button keyboard Akib Azmain Turja
` (2 preceding siblings ...)
2021-07-19 9:52 ` Paul Jewell
@ 2021-07-20 15:30 ` Gary Johnson
3 siblings, 0 replies; 5+ messages in thread
From: Gary Johnson @ 2021-07-20 15:30 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: help-guix
Akib Azmain Turja <akib8492@gmail.com> 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
^ permalink raw reply [flat|nested] 5+ messages in thread