unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
@ 2022-01-12  4:56 Campbell Barton
  2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Campbell Barton @ 2022-01-12  4:56 UTC (permalink / raw)
  To: 53200

With PGTK enabled (--with-pgtk) the following occurs:

- Press C-S-u
- Press a

The character 'a' is entered.

Without PGTK enabled, the following occurs:

- Press C-S-u
- Press a

The character 'aaaa' is entered 4x.

Note that PGTK seems to swallow this binding, since it's not possible to
check what the shortcut does by pressing:

C-H, K, C-S-u

Which reports without PGTK: (universal-argument)



In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.31, cairo version 1.17.4)
 of 2022-01-12 built on austpc
Repository revision: 8555a3e1ed1d34cbaa172bde86eb3b11a1cd7940
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --prefix=/opt/emacs --with-sound=no --disable-acl
 --with-file-notification=no --with-xpm --with-native-compilation
 --with-jpeg --with-tiff --with-gif --with-png --without-rsvg
 --without-lcms2 --without-libsystemd --without-gsettings
 --without-harfbuzz --without-m17n-flt --without-libotf --without-gpm
 --without-dbus --without-gsettings --without-gconf --without-selinux
 --without-gnutls --with-pgtk --without-makeinfo --without-libgmp
 --with-zlib --with-compress-install --with-threads
 --without-toolkit-scroll-bars --with-x-toolkit=gtk3 --with-xft
 --with-modules 'CFLAGS=-O3 -mtune=native -march=native -pipe
 -fomit-frame-pointer''

Configured features:
CAIRO FREETYPE GIF GLIB JPEG JSON LIBXML2 MODULES NATIVE_COMP PDUMPER
PGTK PNG SECCOMP SQLITE3 THREADS TIFF WEBP XIM GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date seq gv
subr-x byte-opt bytecomp byte-compile cconv 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
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win
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 cl-generic
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 simple abbrev obarray
cl-preloaded nadvice button 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
dynamic-setting font-render-setting cairo move-toolbar gtk x-toolkit
pgtk multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 45508 6842)
 (symbols 48 5609 1)
 (strings 32 18557 3267)
 (string-bytes 1 622864)
 (vectors 16 10816)
 (vector-slots 8 157953 15748)
 (floats 8 25 28)
 (intervals 56 255 0)
 (buffers 992 11))





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

* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
  2022-01-12  4:56 bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable Campbell Barton
@ 2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-13  7:08   ` Lars Ingebrigtsen
  2022-04-15  2:01 ` Morgan Smith
  2022-05-22 16:25 ` daanturo
  2 siblings, 1 reply; 8+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-12  6:24 UTC (permalink / raw)
  To: Campbell Barton; +Cc: 53200

Campbell Barton <ideasman42@gmail.com> writes:

> With PGTK enabled (--with-pgtk) the following occurs:
>
> - Press C-S-u
> - Press a
>
> The character 'a' is entered.
>
> Without PGTK enabled, the following occurs:
>
> - Press C-S-u
> - Press a
>
> The character 'aaaa' is entered 4x.
>
> Note that PGTK seems to swallow this binding, since it's not possible to
> check what the shortcut does by pressing:
>
> C-H, K, C-S-u
>
> Which reports without PGTK: (universal-argument)

This has been reported at least twice already.  Someone should volunteer
to find and merge all those bugs, but in short: most GTK input method
modules stupidly eat the shift modifier, and the only workaround is to
disable the use of GTK input methods by setting `pgtk-use-im-context' to
nil.

This is really a bug in the various input modules and should be reported
to their developers instead instead.  If you're using ibus, for example,
complain to ibus developers about their IM context not setting the shift
modifier mask in an event sent by the filter.

Alternatively, you can use the regular X build, which is a much superior
experience over the PGTK port as long as you're not using Wayland.

Thanks, and please let us know about the progress of your complaining to
the IM module developers.  It would be greatly appreciated.





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

* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
  2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-13  7:08   ` Lars Ingebrigtsen
  2022-01-13  8:04     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-13  7:08 UTC (permalink / raw)
  To: Po Lu; +Cc: 53200, Campbell Barton

Po Lu <luangruo@yahoo.com> writes:

> This has been reported at least twice already.  Someone should volunteer
> to find and merge all those bugs

I found bug#49211, which seems to be the same problem, so I've merged
this with that one.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
  2022-01-13  7:08   ` Lars Ingebrigtsen
@ 2022-01-13  8:04     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 8+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-13  8:04 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 53200, Campbell Barton

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I found bug#49211, which seems to be the same problem, so I've merged
> this with that one.

Great, thanks!





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

* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
  2022-01-12  4:56 bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable Campbell Barton
  2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-04-15  2:01 ` Morgan Smith
  2022-05-22 16:25 ` daanturo
  2 siblings, 0 replies; 8+ messages in thread
From: Morgan Smith @ 2022-04-15  2:01 UTC (permalink / raw)
  To: 53200, luangruo

Hello,

I'd like to report that my super key stopped registering.  I 
suspected commit 1404e16975 caused it so I did a quick `git revert 
1404e16975` ontop of 807682de1e and that fixed it.

I'm running pgtk on wayland with (pgtk-use-im-context nil) 
(although that doesn't seem to affect this issue). 

Thanks,

Morgan





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

* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
  2022-01-12  4:56 bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable Campbell Barton
  2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-04-15  2:01 ` Morgan Smith
@ 2022-05-22 16:25 ` daanturo
  2022-05-22 17:44   ` Morgan Smith
  2 siblings, 1 reply; 8+ messages in thread
From: daanturo @ 2022-05-22 16:25 UTC (permalink / raw)
  To: morgan.j.smith; +Cc: 53200

> I'd like to report that my super key stopped registering.  I   
> suspected commit 1404e16975 caused it so I did a quick `git revert   
> 1404e16975` ontop of 807682de1e and that fixed it.
 
Hello,
 
I can't find commit 1404e16975 in Emacs' master tree, but even when having IM disabled via `(setq pgtk-use-im-context-on-new-connection nil)` in init.el, Emacs is unable to recognize any Super-modified keys.
 
It's reproducible in `emacs -q` then `(pgtk-use-im-context nil)`.
 
I'm on Emacs master (8f3e0ed2b99b9b2ad42693cab2b3c0c291e3c3d0).
 
--  
Daanturo.






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

* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
  2022-05-22 16:25 ` daanturo
@ 2022-05-22 17:44   ` Morgan Smith
  2022-05-23  0:55     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Morgan Smith @ 2022-05-22 17:44 UTC (permalink / raw)
  To: daanturo; +Cc: luangruo, 53200

Hello,

daanturo <daanturo@gmail.com> writes:
> Emacs is unable to recognize any Super-modified keys. 

My bad, I gave the wrong git hash.  I meant this hash: 1c1ae6ba80. 
If you want to re-enable super modified keys you have to make the 
following change.  If I remember correctly Po Lu thinks this is a 
bug in some other software and that the GDK_SUPER_MASK bit should 
be set so they don't want to add the GDK_MOD4_MASK bit. 
Personally, I think GDK_MOD4_MASK should be added and we should 
just add a todo comment to look into it more later.

I suppose the thought is that in theory someone could use MOD4 as 
a custom modifier instead of using it as super but realistically I 
think someone trying to do that would have lots of problems.  It 
would be cool if that was possible though so I do support trying 
to rid ourselves of odd grandfathered in quirks.


diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 
b9d0b7b512..3ef643a075 100644 --- a/src/pgtkterm.c +++ 
b/src/pgtkterm.c @@ -5018,7 +5018,7 @@ pgtk_gtk_to_emacs_modifiers 
(struct pgtk_display_info *dpyinfo, int state) 
     mod |= mod_ctrl; 
   if (state & GDK_META_MASK || state & GDK_MOD1_MASK) 
     mod |= mod_meta; 
-  if (state & GDK_SUPER_MASK) +  if (state & GDK_SUPER_MASK || 
state & GDK_MOD4_MASK) 
     mod |= mod_super; 
   if (state & GDK_HYPER_MASK) 
     mod |= mod_hyper; 
@@ -5151,7 +5151,8 @@ key_press_event (GtkWidget *widget, GdkEvent 
*event, gpointer *user_data) 
       /* While super is pressed, the input method will always 
       always 
 	 resend the key events ignoring super.  As a workaround, don't 
 filter key events with super or hyper pressed.  */ 
-      if (!(event->key.state & (GDK_SUPER_MASK | 
GDK_HYPER_MASK))) +      if (!(event->key.state & + 
(GDK_SUPER_MASK | GDK_MOD4_MASK | GDK_HYPER_MASK))) 
 	{ if (pgtk_im_filter_keypress (f, &event->key)) return TRUE; 








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

* bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable
  2022-05-22 17:44   ` Morgan Smith
@ 2022-05-23  0:55     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 8+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-23  0:55 UTC (permalink / raw)
  To: Morgan Smith; +Cc: 53200, daanturo

Morgan Smith <morgan.j.smith@outlook.com> writes:

> Hello,
>
> daanturo <daanturo@gmail.com> writes:
>> Emacs is unable to recognize any Super-modified keys. 
>
> My bad, I gave the wrong git hash.  I meant this hash: 1c1ae6ba80. If
> you want to re-enable super modified keys you have to make the
> following change.  If I remember correctly Po Lu thinks this is a bug
> in some other software and that the GDK_SUPER_MASK bit should be set
> so they don't want to add the GDK_MOD4_MASK bit. Personally, I think
> GDK_MOD4_MASK should be added and we should just add a todo comment to
> look into it more later.
>
> I suppose the thought is that in theory someone could use MOD4 as a
> custom modifier instead of using it as super but realistically I think
> someone trying to do that would have lots of problems.  It would be
> cool if that was possible though so I do support trying to rid
> ourselves of odd grandfathered in quirks.

No.  It is safe to use Mod4 for something else than Super.  (On X
Windows it is often Hyper, or both at the same time, or else.)

The only modifier that is not safe to change is Mod1, which GTK always
assumes to be alt.

Please let the GTK developers know that the bug is important here:
https://gitlab.gnome.org/GNOME/gtk/-/issues/4913

Otherwise, they will keep ignoring it, as usual.





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

end of thread, other threads:[~2022-05-23  0:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  4:56 bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable Campbell Barton
2022-01-12  6:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-13  7:08   ` Lars Ingebrigtsen
2022-01-13  8:04     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-15  2:01 ` Morgan Smith
2022-05-22 16:25 ` daanturo
2022-05-22 17:44   ` Morgan Smith
2022-05-23  0:55     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

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

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).