GNU bug report logs -
#50364
27.2; EDT mode Xmodmap related documentation needs updating
Previous Next
To reply to this bug, email your comments to 50364 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Fri, 03 Sep 2021 23:26:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
htl10 <at> users.sourceforge.net
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 03 Sep 2021 23:26:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
Been fighting with EDT mode configuration for a few weeks.
The fundamental problem is that all the Xmodmap related instruction in
https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/edt.texi#n418
and the entire section from about
https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/edt.texi#n325
to
https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/edt.texi#n530
is significantly outdated, by about a whole decade.
Modern Linux - and also Sun Workstations which have Gnome as desktop - supports
plug-and-play keyboards and mouses with X Keyboard Extension, and would periodically
reset any manually applied xmodmap settings; and also since about Gnome 3.6
(around 2010), ignores .Xmodmap .
The proper way of remapping the Num_Lock key to EDT's GOLD key usage
is via a custom keyboard layout with X Keyboard Extension. Failing that,
the Apple family of xkb keyboard models, "Apple laptop", and "Apple Aluminium (*)",
apple_laptop/applealu_ansi/applealu_iso/applealu_jis , have a definition
for the Clear key at that key location.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Sat, 04 Sep 2021 06:20:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 50364 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 3 Sep 2021 23:25:21 +0000 (UTC)
> Cc: Charles Aylmer <ca22 <at> cam.ac.uk>
> From: Hin-Tak Leung via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Been fighting with EDT mode configuration for a few weeks.
>
> The fundamental problem is that all the Xmodmap related instruction in
> https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/edt.texi#n418
> and the entire section from about
> https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/edt.texi#n325
> to
> https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/misc/edt.texi#n530
> is significantly outdated, by about a whole decade.
>
> Modern Linux - and also Sun Workstations which have Gnome as desktop - supports
> plug-and-play keyboards and mouses with X Keyboard Extension, and would periodically
> reset any manually applied xmodmap settings; and also since about Gnome 3.6
> (around 2010), ignores .Xmodmap .
>
> The proper way of remapping the Num_Lock key to EDT's GOLD key usage
> is via a custom keyboard layout with X Keyboard Extension. Failing that,
> the Apple family of xkb keyboard models, "Apple laptop", and "Apple Aluminium (*)",
> apple_laptop/applealu_ansi/applealu_iso/applealu_jis , have a definition
> for the Clear key at that key location.
Thanks. Would you like to write some text that explains how to
achieve this on modern platforms? We could then update or augment
what the manual says as appropriate.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Sat, 04 Sep 2021 20:52:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 50364 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Saturday, 4 September 2021, 07:19:39 BST, Eli Zaretskii <eliz <at> gnu.org> wrote:
> Thanks. Would you like to write some text that explains how to
> achieve this on modern platforms? We could then update or augment
> what the manual says as appropriate.
Yes, I could do that, when I figure out a neat way of doing it.
The current EDT documentation is misleading/out-dated in two aspects:
it gives the impression that ~/.Xmodmap is auto-applied when a user logs in
to an X session. This file is ignored for about a decade for Gnome now,
and likely KDE, too. The second matter is that even if a user manually
runs "xmodmap ~/.Xmodmap", gnome-setting-daemon (and its KDE
equivalent, kxkb) periodically resets any manually applied xmodmap keyboard
mappings.
As far as I understand it, this is driven by two modern linux usages: plug-and-play
keyboards and power management, and desktop-wide international input support.
Thus keyboard layouts are re-applied, whenever user plugs in new external
keyboards (for laptops), screensaver/monitor sleeps, or keyboard goes to sleep
and wake up. Keyboard layouts are also reset when a user explicitly choose
to input non-ascii characters via switching the desktop input methods.
Since modern Xorg can auto-detect unusual keyboards and already bundles
190 models and 100 layouts (on my system), it seems to be quite difficult to
"only" remaps a few keys.
The smallest change that is persistent is doing both:
Editing /usr/share/X11/xkb/symbols/pc, from
23: key <NMLK> { [ Num_Lock ] };
to
23: key <NMLK> { [ Clear ] };
and append to "gsettings get org.gnome.desktop.input-sources xkb-options" (retrieving the current xkb options)
with 'numpad:mac' using "gsettings set org.gnome.desktop.input-sources xkb-options" (setting it).
The combination of these two effectively turns the numerical keypad of the PC keyboard
to closer to how the "Apple Aluminium (*)" family of keyboards behave.
This approach suffers from editing a system file (and requires admin privilege, and
also needs redoing on package upgrades).
There are a few alternative approaches, such as declaring new keyboard layouts
(scattering a few new files across /usr/share/X11/xkb/ and editing a few existing
ones, also require admin privilege) or custom scripts trigged to run on power/plug
events (details of this functionality seems to have changed over the years, and
flaky). So I haven't found a satisfactory answer that is simple, persistent,
user-config-only without root privilege, applicable to different Linux vintage, yet.
I can condense and improve the above into a patch, if you are happy to take it...
Argh, there is also advice about running a script in the background which
periodically runs "xmodmap ~/.Xmodmap" every 5 or 10 seconds!
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Tue, 28 Sep 2021 13:16:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 50364 <at> debbugs.gnu.org (full text, mbox):
Hin-Tak Leung <htl10 <at> users.sourceforge.net> writes:
> I can condense and improve the above into a patch, if you are happy to take it...
It seems like you got no reply here, but to clarify, we would indeed be
happy to take such a patch. Thank you for working on this.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Tue, 19 Oct 2021 14:43:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 50364 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Saturday, 4 September 2021, 07:19:39 BST, Eli Zaretskii <eliz <at> gnu.org> wrote:
> Thanks. Would you like to write some text that explains how to
> achieve this on modern platforms? We could then update or augment
> what the manual says as appropriate.
I should say that I intend to come back to this, and submit a patch/diff to the documentation when I find the time to do so. Hopefully before Christmas...
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Tue, 19 Oct 2021 16:10:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 50364 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 19 Oct 2021 14:42:09 +0000 (UTC)
> From: Hin-Tak Leung <htl10 <at> users.sourceforge.net>
> Cc: 50364 <at> debbugs.gnu.org, ca22 <at> cam.ac.uk
>
> On Saturday, 4 September 2021, 07:19:39 BST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > Thanks. Would you like to write some text that explains how to
> > achieve this on modern platforms? We could then update or augment
> > what the manual says as appropriate.
>
> I should say that I intend to come back to this, and submit a patch/diff to the documentation when I find the
> time to do so. Hopefully before Christmas...
Thanks in advance.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Mon, 22 Aug 2022 20:10:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 50364 <at> debbugs.gnu.org (full text, mbox):
Hin-Tak Leung <htl10 <at> users.sourceforge.net> writes:
>
> On Saturday, 4 September 2021, 07:19:39 BST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> Thanks. Would you like to write some text that explains how to
>> achieve this on modern platforms? We could then update or augment
>> what the manual says as appropriate.
>
> I should say that I intend to come back to this, and submit a patch/diff to the
> documentation when I find the time to do so. Hopefully before Christmas...
This was more than half a year ago -- did you make any progress here?
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 22 Aug 2022 20:10:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50364
; Package
emacs
.
(Tue, 23 Aug 2022 01:03:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 50364 <at> debbugs.gnu.org (full text, mbox):
Hin-Tak Leung <htl10 <at> users.sourceforge.net> writes:
> Yes, I could do that, when I figure out a neat way of doing it.
>
> The current EDT documentation is misleading/out-dated in two aspects:
> it gives the impression that ~/.Xmodmap is auto-applied when a user logs in
> to an X session. This file is ignored for about a decade for Gnome now,
> and likely KDE, too. The second matter is that even if a user manually
> runs "xmodmap ~/.Xmodmap", gnome-setting-daemon (and its KDE
> equivalent, kxkb) periodically resets any manually applied xmodmap keyboard
> mappings.
>
> As far as I understand it, this is driven by two modern linux usages: plug-and-play
> keyboards and power management, and desktop-wide international input support.
> Thus keyboard layouts are re-applied, whenever user plugs in new external
> keyboards (for laptops), screensaver/monitor sleeps, or keyboard goes to sleep
> and wake up. Keyboard layouts are also reset when a user explicitly choose
> to input non-ascii characters via switching the desktop input methods.
>
> Since modern Xorg can auto-detect unusual keyboards and already bundles
> 190 models and 100 layouts (on my system), it seems to be quite difficult to
> "only" remaps a few keys.
>
> The smallest change that is persistent is doing both:
>
> Editing /usr/share/X11/xkb/symbols/pc, from
> 23: key <NMLK> { [ Num_Lock ] };
> to
> 23: key <NMLK> { [ Clear ] };
>
> and append to "gsettings get org.gnome.desktop.input-sources xkb-options" (retrieving the current xkb options)
> with 'numpad:mac' using "gsettings set org.gnome.desktop.input-sources xkb-options" (setting it).
>
> The combination of these two effectively turns the numerical keypad of the PC keyboard
> to closer to how the "Apple Aluminium (*)" family of keyboards behave.
>
> This approach suffers from editing a system file (and requires admin privilege, and
> also needs redoing on package upgrades).
>
> There are a few alternative approaches, such as declaring new keyboard layouts
> (scattering a few new files across /usr/share/X11/xkb/ and editing a few existing
> ones, also require admin privilege) or custom scripts trigged to run on power/plug
> events (details of this functionality seems to have changed over the years, and
> flaky). So I haven't found a satisfactory answer that is simple, persistent,
> user-config-only without root privilege, applicable to different Linux vintage, yet.
>
> I can condense and improve the above into a patch, if you are happy to take it...
>
> Argh, there is also advice about running a script in the background which
> periodically runs "xmodmap ~/.Xmodmap" every 5 or 10 seconds!
Please keep the previous method documented. I don't use plug-and-play
keyboards (indeed PS/2 is not even safe to hotplug), and in addition to
that, Emacs runs on ancient X servers all the way back to the original
X11R6 sample server.
Removed tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 20 Sep 2022 10:45:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.