* xmodmap doesn't before pressing any button keyboard
@ 2021-07-18 14:41 Akib Azmain Turja
2021-07-18 16:09 ` stuebinm
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Akib Azmain Turja @ 2021-07-18 14:41 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 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
` (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
end of thread, other threads:[~2021-07-20 15:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).