all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66558: 29.1; .Xmodmap Win-key configurations cause keybinding issues
@ 2023-10-15  8:44 Dev Null
  2023-10-16  0:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Dev Null @ 2023-10-15  8:44 UTC (permalink / raw)
  To: 66558

[-- Attachment #1: Type: text/plain, Size: 3659 bytes --]

The following lines of my '~/.Xmodmap' file remap my left Win key
to Ctrl:

remove mod4 = Super_L
add control = Super_L

When I run GUI Emacs with this in place, entering any keybinding 'C-s-X
is undefined', where X is the key that I pressed. E.g. if I press 'C-n',
I get the following:

'C-s-n is undefined'

In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38,
cairo version 1.17.8)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Arch Linux

Configured using:
 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --with-tree-sitter --localstatedir=/var --with-cairo
 --disable-build-details --with-harfbuzz --with-libsystemd
 --with-modules --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64
 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2
 -Wformat -Werror=format-security -fstack-clash-protection
 -fcf-protection -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: C.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
emacs)

Memory information:
((conses 16 36436 12851)
 (symbols 48 5151 0)
 (strings 32 13179 1298)
 (string-bytes 1 373971)
 (vectors 16 9324)
 (vector-slots 8 148882 13860)
 (floats 8 21 23)
 (intervals 56 234 0)
 (buffers 984 10))

[-- Attachment #2: Type: text/html, Size: 4137 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66558: 29.1; .Xmodmap Win-key configurations cause keybinding issues
  2023-10-15  8:44 bug#66558: 29.1; .Xmodmap Win-key configurations cause keybinding issues Dev Null
@ 2023-10-16  0:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-16  9:52   ` Dev Null
  0 siblings, 1 reply; 4+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-16  0:56 UTC (permalink / raw)
  To: Dev Null; +Cc: 66558

Dev Null <patriot.game@gmail.com> writes:

> The following lines of my '~/.Xmodmap' file remap my left Win key
> to Ctrl:
>
> remove mod4 = Super_L
> add control = Super_L
>
> When I run GUI Emacs with this in place, entering any keybinding 'C-s-X
> is undefined', where X is the key that I pressed. E.g. if I press 'C-n',
> I get the following:
>
> 'C-s-n is undefined'

My powers of clairvoyance enable me to deduce that another key is bound
to control, in all likelihood Control_L.  You must remove _every_ key
from a real modifier you rebind, or Emacs will rightly attribute to
events with it pressed the detritus of previous bindings that remains.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66558: 29.1; .Xmodmap Win-key configurations cause keybinding issues
  2023-10-16  0:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-16  9:52   ` Dev Null
  2023-10-16 10:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Dev Null @ 2023-10-16  9:52 UTC (permalink / raw)
  To: Po Lu; +Cc: 66558

[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]

Sorry, I’m a little confused. The Win key appears to be recognized by Emacs
as the ’S’ modifier. If I run Emacs without that .Xmodmap file, and I hit
the left win key + n, I get ’S-n’. If I use an Xmodmap file consisting of
just those two lines and hit the left win key + n, I get 'C-s-n'. So it
appears that after the Xmodmap is read, Emacs is still recognizing my Win
key as being bound to super, while other programs on my system don't seem
to have that issue. I'm having trouble understanding why keys bound to
control are the issue here.

On Sun, Oct 15, 2023 at 8:56 PM Po Lu <luangruo@yahoo.com> wrote:

> Dev Null <patriot.game@gmail.com> writes:
>
> > The following lines of my '~/.Xmodmap' file remap my left Win key
> > to Ctrl:
> >
> > remove mod4 = Super_L
> > add control = Super_L
> >
> > When I run GUI Emacs with this in place, entering any keybinding 'C-s-X
> > is undefined', where X is the key that I pressed. E.g. if I press 'C-n',
> > I get the following:
> >
> > 'C-s-n is undefined'
>
> My powers of clairvoyance enable me to deduce that another key is bound
> to control, in all likelihood Control_L.  You must remove _every_ key
> from a real modifier you rebind, or Emacs will rightly attribute to
> events with it pressed the detritus of previous bindings that remains.
>

[-- Attachment #2: Type: text/html, Size: 1798 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66558: 29.1; .Xmodmap Win-key configurations cause keybinding issues
  2023-10-16  9:52   ` Dev Null
@ 2023-10-16 10:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 4+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-16 10:59 UTC (permalink / raw)
  To: Dev Null; +Cc: 66558

Dev Null <patriot.game@gmail.com> writes:

> Sorry, I’m a little confused. The Win key appears to be recognized by
> Emacs as the ’S’ modifier. If I run Emacs without that .Xmodmap file,
> and I hit the left win key + n, I get ’S-n’. If I use an Xmodmap file
> consisting of just those two lines and hit the left win key + n, I get
> 'C-s-n'. So it appears that after the Xmodmap is read, Emacs is still
> recognizing my Win key as being bound to super, while other programs
> on my system don't seem to have that issue. I'm having trouble
> understanding why keys bound to control are the issue here.

My mistake.  When you rebind Super to a non-virtual modifier bit such as
control through xmodmap, the XKB virtual modifier Super is also assigned
to that bit.

Emacs 29 no longer respects such misconfigurations when the XKB
extension is enabled on the X server.  Since the control modifier bit is
furthermore uniformly interpreted as Control, any event arriving with
ControlMask set always matches both the predefined Control modifier and
the Super virtual modifier established during display setup.  I think
the solution is for you to assign the Super keysyms to Control through
XKB, while I devise a fix for Emacs 30.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-16 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-15  8:44 bug#66558: 29.1; .Xmodmap Win-key configurations cause keybinding issues Dev Null
2023-10-16  0:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-16  9:52   ` Dev Null
2023-10-16 10:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.