From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: bg.jheng@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#54889: 29.0.50; shift keys can't function when using setxkbmap with custom_symbol in gnome Date: Thu, 14 Apr 2022 11:48:04 +0000 Message-ID: References: <8735ihx30j.fsf@yahoo.com> <87ilrdvf5p.fsf@yahoo.com> <877d7tvatx.fsf@yahoo.com> <87bkx4trnl.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000fc0eab05dc9bfd30" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1811"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54889@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 14 13:58:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ney70-0000GT-4J for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Apr 2022 13:58:10 +0200 Original-Received: from localhost ([::1]:47202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ney6z-0004ql-0N for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Apr 2022 07:58:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ney6s-0004qT-LV for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2022 07:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33383) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ney6s-0000sb-Ao for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2022 07:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ney6s-0000lK-8t for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2022 07:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: bg.jheng@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Apr 2022 11:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54889 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 54889-submit@debbugs.gnu.org id=B54889.16499374322875 (code B ref 54889); Thu, 14 Apr 2022 11:58:02 +0000 Original-Received: (at 54889) by debbugs.gnu.org; 14 Apr 2022 11:57:12 +0000 Original-Received: from localhost ([127.0.0.1]:55513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ney63-0000kI-Qg for submit@debbugs.gnu.org; Thu, 14 Apr 2022 07:57:12 -0400 Original-Received: from mail-ej1-f52.google.com ([209.85.218.52]:41858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ney61-0000k4-0x for 54889@debbugs.gnu.org; Thu, 14 Apr 2022 07:57:10 -0400 Original-Received: by mail-ej1-f52.google.com with SMTP id bh17so9545792ejb.8 for <54889@debbugs.gnu.org>; Thu, 14 Apr 2022 04:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gQMd/9bzrAyUvnaEXEHY+REdvLOT4bADJf53qHWx7jE=; b=gDtWu7p+bnvK6wPPy0PK14qIXfUjj/E3dOu48H7Am1hHAibexU3WyVAD0zL17n5DL8 5dtz2HsVOB5iRVudNAOKhsVDxIvbhF6DUAam7sbS2TBq1a8vfdAT7mt6FqA7AaDAEfHk 8xNu6ab7u9/9l3s1wBHbevF46WwlK6Gtm1XPtiXFdsfoDwv4PhglhpoU74uQawIC+reM XgnKN+BiFl6kQsFwU5yRwzHA3WcjK9i5PPT2X1o7D4+bAjvFKvUIHj7JvF25KjE1HUxH FeV3phgs9/7na39BO+uXAkTqDY8uFKqXWUQE1t+JxZ8uFIKJ3tocZEZScxxNNc/ZgSpr oKdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gQMd/9bzrAyUvnaEXEHY+REdvLOT4bADJf53qHWx7jE=; b=gISBInOzbh/uXuCjW+RF0sl/hfX8RMiY6hVx8gL0CUiOcUwzf+nmcZM5hqFZgMgxd8 57dqu88OzvmcpmdOPqOTgb/zaCTUSmM6NpjK8IKINXiM8Hm+8PVHX0aMNQNBL2NTcKQ8 VkiouOkRHn9I8ymcuCN3pEdR6JN4whwgcjjXaorjDZeDWYxpmT7hEqyYpKBZ4IL5y49M d1vh675RaZtPBDaQhY9UGhG8iNX0uYf+8H+e7CNl7HuicNOzwFRAV+TVBTeiE7AoY4Pv ED59XF3fpVKfdg6rm+4GaJmuIm3EmDXEzMsQSJeP/Mncsfk/y3vgxH4AqlOgBWBTwAkq dTyg== X-Gm-Message-State: AOAM530WFJ0+KtVd3kSvRuRd013ooBJxLtBYnMOGikoQdoIIdr6HFuS9 i439AmMobaOpFQJzl7JFctFVcWJIlmgDryJbn7cM1/iC X-Google-Smtp-Source: ABdhPJzAL7JognzapwyhThqJbYMB1B2WQ1MtKQaQPFYCd5RxAcWZLR5CxVA5bESO7rAUU4YDFJCqdBuV0jt/UGhK3tE= X-Received: by 2002:a17:907:3ea0:b0:6e8:d28b:28de with SMTP id hs32-20020a1709073ea000b006e8d28b28demr1352486ejc.632.1649937422748; Thu, 14 Apr 2022 04:57:02 -0700 (PDT) In-Reply-To: <87bkx4trnl.fsf@yahoo.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229862 Archived-At: --000000000000fc0eab05dc9bfd30 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I am sorry, i will notice to use 'reply all' since this time. here is this time i tried: 1. after 'run' , i do not see gui window, i have no way to input, here is the result: $ gdb ./emacs -q Reading symbols from ./emacs... SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY =3D :0 TERM =3D rxvt-unicode-256color Breakpoint 1 at 0x4ac18: file emacs.c, line 412. Breakpoint 2 at 0x129bc0: file xterm.c, line 19625. (gdb) break xterm.c:17399 Breakpoint 3 at 0x13cb23: file xterm.c, line 18393. (gdb) run Starting program: /dev/shm/e29/src/emacs [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff1356640 (LWP 198258)] [New Thread 0x7ffff0ae1640 (LWP 198259)] [New Thread 0x7fffebfff640 (LWP 198260)] [New Thread 0x7fffeb758640 (LWP 198261)] [New Thread 0x7fffeaf57640 (LWP 198262)] [New Thread 0x7fffea756640 (LWP 198263)] Thread 1 "emacs" hit Breakpoint 3, handle_one_xevent (dpyinfo=3D0x555555e69600, event=3D0x7fffffffd120, finish=3D= , hold_quit=3D0x7fffffffd3f0) at xterm.c:18393 18393 if (dpyinfo->supports_xkb (gdb) p xkey.state No symbol "xkey" in current context. (gdb) p dpyinfo->hyper_mod_mask $1 =3D 1 2. i saw a word "optimized" and found this .configure cmd in folder e29/etc/ : ./configure --enable-checking=3D'yes,glyphs' --enable-check-lisp-object-ty= pe \ CFLAGS=3D'-O0 -g3' then rebuild again $ make clean $ ./auto $ ./configure --enable-checking=3D'yes,glyphs' --enable-check-lisp-object-type \ CFLAGS=3D'-O0 -g3' $ make - j 4 run gdb, because there is no gui emacs occur, i have no way to input: $ gdb ./emacs -q Reading symbols from ./emacs... SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY =3D :0 TERM =3D rxvt-unicode-256color Breakpoint 1 at 0x212569: file emacs.c, line 412. Breakpoint 2 at 0x1c7e96: file xterm.c, line 19625. (gdb) break xterm.c:17399 Breakpoint 3 at 0x1c52f0: file xterm.c, line 18393. (gdb) run Starting program: /dev/shm/e29/src/emacs [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff1355640 (LWP 207348)] [New Thread 0x7ffff0ae0640 (LWP 207349)] [New Thread 0x7fffebfff640 (LWP 207350)] [New Thread 0x7fffeb758640 (LWP 207351)] [New Thread 0x7fffeaf57640 (LWP 207352)] [New Thread 0x7fffea756640 (LWP 207353)] Thread 1 "emacs" hit Breakpoint 3, handle_one_xevent (dpyinfo=3D0x555556145600, event=3D0x7fffffffc500, finish=3D0x555555e908fc , hold_quit=3D0x7fffffffc830) at xterm.c:18393 18393 if (dpyinfo->supports_xkb (gdb) p xkey.state No symbol "xkey" in current context. (gdb) p dpyinfo->hyper_mod_mask $1 =3D 1 3. i also try run in 'sudo su', emacs gui appeared, but after this prompt '(gdb)' showed again, the gui window freezed and can not input anymore, then appeared guit window : "EmacsClientOpen" is not responding" . later, the execute cmd result is in below: [root@pc src]# gdb ./emacs -q Reading symbols from ./emacs... SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY =3D :0 TERM =3D rxvt-unicode-256color Breakpoint 1 at 0x212569: file emacs.c, line 412. Breakpoint 2 at 0x1c7e96: file xterm.c, line 19625. (gdb) break xterm.c:17399 Breakpoint 3 at 0x1c52f0: file xterm.c, line 18393. (gdb) run Starting program: /dev/shm/e29/src/emacs [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff1355640 (LWP 210606)] [New Thread 0x7ffff0a5f640 (LWP 210607)] [Detaching after fork from child process 210608] [Detaching after fork from child process 210609] [New Thread 0x7fffebfff640 (LWP 210610)] [New Thread 0x7fffeb7fe640 (LWP 210611)] [Thread 0x7fffeb7fe640 (LWP 210611) exited] [New Thread 0x7fffeb7fe640 (LWP 210612)] [New Thread 0x7fffeaffd640 (LWP 210613)] [Thread 0x7fffeb7fe640 (LWP 210612) exited] [Thread 0x7fffeaffd640 (LWP 210613) exited] Thread 1 "emacs" hit Breakpoint 3, handle_one_xevent (dpyinfo=3D0x55555610c980, event=3D0x7fffffffd710, finish=3D0x555555e908fc , hold_quit=3D0x7fffffffda40) at xterm.c:18393 warning: Source file is more recent than executable. 18393 if (dpyinfo->supports_xkb (gdb) p xkey.state No symbol "xkey" in current context. (gdb) p dpyinfo->hyper_mod_mask $1 =3D 1 Po Lu =E6=96=BC 2022=E5=B9=B44=E6=9C=8814=E6=97=A5 =E9= =80=B1=E5=9B=9B =E4=B8=8A=E5=8D=8812:50=E5=AF=AB=E9=81=93=EF=BC=9A > [Seriously, please use "Reply All", otherwise the bug tracker cannot > record this conversation. Thanks] > > bg.jheng@gmail.com writes: > > 2. because i am not familier gdb, > > i need aide : > > a) this is message wnen i enter gdb /dev/shm/e29/src/emacs -q , > > > > But that probably won't help, since > > GTK native input is usually the first thing to go awry when you start > > messing with modifier mapping. > > > > Can you attach a debugger to Emacs, add a breakpoint to this part of > > xterm.c: > > > > xkey.type =3D KeyPress; > > xkey.serial =3D xev->serial; > > xkey.send_event =3D xev->send_event; > > xkey.display =3D dpyinfo->display; > > xkey.window =3D xev->event; > > xkey.root =3D xev->root; > > xkey.subwindow =3D xev->child; > > xkey.time =3D xev->time; > > xkey.state =3D ((xev->mods.effective & ~(1 << 13 | 1 << 1= 4)) > > | (xev->group.effective << 13)); > > > > =3D=3D=3D> xkey.x =3D lrint (xev->event_x); > > xkey.y =3D lrint (xev->event_y); > > xkey.x_root =3D lrint (xev->root_x); > > xkey.y_root =3D lrint (xev->root_y); > > > > press "Shift-A", and then show the value of `xkey.state'? > > > > This should work for you, assuming you're using a fresh copy of Emacs > > from the master branch: > > > > $ gdb path/to/emacs/binary -Q > > ... > > (gdb) break xterm.c:17399 > > ... the breakpoint is hit after pressing the key > > (gdb) p xkey.state > > > > Also, please show the value of dpyinfo->hyper_mod_mask at that time, > > like this: > > > > (gdb) p dpyinfo->hyper_mod_mask > > > > If the debugger complains about certain values being optimized out, > > rebuild Emacs without optimizations according to the instructions in > > etc/DEBUG. > > > > Po Lu =E6=96=BC 2022=E5=B9=B44=E6=9C=8813=E6=97=A5= =E9=80=B1=E4=B8=89 =E4=B8=8A=E5=8D=884:58=E5=AF=AB=E9=81=93=EF=BC=9A > > > > bg.jheng@gmail.com writes: > > > > > 1. xmodmap is outputed: > > > > > > xmodmap: up to 3 keys per modifier, (keycodes in parentheses): > > > > > > shift Shift_L (0x32), Shift_R (0x3e) > > > lock > > > control Control_L (0x25), Control_L (0x42), Control_R (0x69) > > > mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd) > > > mod2 Num_Lock (0x4d) > > > mod3 ISO_Last_Group (0x87), Mode_switch (0xcb) > > > mod4 Super_L (0x85), Super_L (0xce), Hyper_L (0xcf) > > > mod5 BadKey (0x5c), ISO_Level3_Shift (0x86) > > > > > > 2-1. i tried these cmd: > > > ./configure --with-xinput2 > > > then > > > make -j 4 > > > > > > after done: > > > emacs -q -xrm 'Emacs.useXIM: false' > > > > > > still the same, if i press Shift+A , minibuffer showed "H-a is > undefined" and no capital letter inputed. > > > > > > 2-2. could you teach me how to tuen on 'x-gtk-use-native-input' ? > > > i have no comprehensive knowlage about linux in now. > > > > Hi, > > > > >> (setq x-gtk-use-native-input t). > > > > as you expect, after excute it still can't input capital letter > with shift key. > > > > >> Can you attach a debugger to Emacs, add a breakpoint to this part o= f > > xterm.c: > > > > unfortunally, in this step, my base knowlage not enough, > > here is the result: > > 1.git clone https://github.com/emacs-mirror/emacs to > /dev/shm/e29/ > > 2. after ./configure then build, cd ./src > > gdb ./emacs -q > > > > first, a lot message occured, > > i put these text in ~/.config/gdb/gdbinit , after google: > > add-auto-load-safe-path /dev/shm/e29/src/ > > set auto-load safe-path /dev/shm/e29/src/ > > hope it is a right way. > > > > 3. then execute: > > $ gdb ./emacs -q > > Reading symbols from ./emacs... > > SIGINT is used by the debugger. > > Are you sure you want to change it? (y or n) [answered Y; input not fro= m > terminal] > > DISPLAY =3D :0 > > TERM =3D rxvt-unicode-256color > > Breakpoint 1 at 0x4ac18: file emacs.c, line 412. > > Breakpoint 2 at 0x129bc0: file xterm.c, line 19625. > > > > (gdb) break xterm.c:17399 > > Breakpoint 3 at 0x13cb23: file xterm.c, line 18393. > > You forgot to enter "run" and then press Shift-A here once the input > focus shifts to the Emacs window. I'm sorry for not mentioning that > earlier. Thanks. > --000000000000fc0eab05dc9bfd30 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am sorry, i will notice to use 'reply all'= since this time.

here is this time i tried:

1. after 'run' , i do not see gui window,i have no way to input,
here is the result:

$ gdb ./emacs -qReading symbols from ./emacs...
SIGINT is used by the debugger.
Are = you sure you want to change it? (y or n) [answered Y; input not from termin= al]
DISPLAY =3D :0
TERM =3D rxvt-unicode-256color
Breakpoint 1 at = 0x4ac18: file emacs.c, line 412.
Breakpoint 2 at 0x129bc0: file xterm.c,= line 19625.
(gdb) break xterm.c:17399
Breakpoint 3 at 0x13cb23: file= xterm.c, line 18393.
(gdb) run
Starting program: /dev/shm/e29/src/em= acs
[Thread debugging using libthread_db enabled]
Using host libthrea= d_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff= 1356640 (LWP 198258)]
[New Thread 0x7ffff0ae1640 (LWP 198259)]
[New T= hread 0x7fffebfff640 (LWP 198260)]
[New Thread 0x7fffeb758640 (LWP 19826= 1)]
[New Thread 0x7fffeaf57640 (LWP 198262)]
[New Thread 0x7fffea7566= 40 (LWP 198263)]

Thread 1 "emacs" hit Breakpoint 3, handle= _one_xevent (dpyinfo=3D0x555555e69600, event=3D0x7fffffffd120, finish=3D<= ;optimized out>, hold_quit=3D0x7fffffffd3f0) at xterm.c:18393
18393= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (dpyinfo->supports_= xkb
(gdb) p xkey.state
No symbol "xkey" in current context.=
(gdb) p dpyinfo->hyper_mod_mask
$1 =3D 1


2.
i saw a= word "optimized"
and found this .configure cmd in folder=C2= =A0 e29/etc/ :
=C2=A0./configure --enable-checking=3D'yes,glyphs'= ; --enable-check-lisp-object-type \
=C2=A0=C2=A0=C2=A0 CFLAGS=3D'-O0= -g3'

then rebuild again
=C2=A0 $ make clean
=C2=A0 $ ./au= to
=C2=A0 $ ./configure --enable-checking=3D'yes,glyphs' --enabl= e-check-lisp-object-type \
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 CFLAGS=3D'= -O0 -g3'
=C2=A0 $ make - j 4

run gdb,
because there is no = gui emacs occur,
i have no way to input:
=C2=A0 $ gdb ./emacs -q
= =C2=A0 Reading symbols from ./emacs...
=C2=A0 SIGINT is used by the debu= gger.
=C2=A0 Are you sure you want to change it? (y or n) [answered Y; i= nput not from terminal]
=C2=A0 DISPLAY =3D :0
=C2=A0 TERM =3D rxvt-un= icode-256color
=C2=A0 Breakpoint 1 at 0x212569: file emacs.c, line 412.<= br>=C2=A0 Breakpoint 2 at 0x1c7e96: file xterm.c, line 19625.
=C2=A0 (gd= b) break xterm.c:17399
=C2=A0 Breakpoint 3 at 0x1c52f0: file xterm.c, li= ne 18393.
=C2=A0 (gdb) run
=C2=A0 Starting program: /dev/shm/e29/src/= emacs
=C2=A0 [Thread debugging using libthread_db enabled]
=C2=A0 Usi= ng host libthread_db library "/usr/lib/libthread_db.so.1".
=C2= =A0 [New Thread 0x7ffff1355640 (LWP 207348)]
=C2=A0 [New Thread 0x7ffff0= ae0640 (LWP 207349)]
=C2=A0 [New Thread 0x7fffebfff640 (LWP 207350)]
= =C2=A0 [New Thread 0x7fffeb758640 (LWP 207351)]
=C2=A0 [New Thread 0x7ff= feaf57640 (LWP 207352)]
=C2=A0 [New Thread 0x7fffea756640 (LWP 207353)]<= br>
=C2=A0 Thread 1 "emacs" hit Breakpoint 3, handle_one_xeven= t (dpyinfo=3D0x555556145600, event=3D0x7fffffffc500, finish=3D0x555555e908f= c <current_finish>, hold_quit=3D0x7fffffffc830) at xterm.c:18393
= =C2=A0 18393=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (dpyinfo-&= gt;supports_xkb
=C2=A0 (gdb) p xkey.state
=C2=A0 No symbol "xkey= " in current context.
=C2=A0 (gdb) p dpyinfo->hyper_mod_mask
= =C2=A0 $1 =3D 1


3.
i also try run in 'sudo su',
em= acs gui appeared,
but after this prompt '(gdb)' showed again,the gui window freezed and can not input anymore,
then appeared=C2=A0 g= uit window : "EmacsClientOpen" is not responding"=C2=A0 .later, the execute cmd result is in below:

[root@pc src]#=C2=A0=C2= =A0 gdb ./emacs -q
Reading symbols from ./emacs...
SIGINT is used by = the debugger.
Are you sure you want to change it? (y or n) [answered Y; = input not from terminal]
DISPLAY =3D :0
TERM =3D rxvt-unicode-256colo= r
Breakpoint 1 at 0x212569: file emacs.c, line 412.
Breakpoint 2 at 0= x1c7e96: file xterm.c, line 19625.
(gdb)=C2=A0 break xterm.c:17399
Br= eakpoint 3 at 0x1c52f0: file xterm.c, line 18393.
(gdb) run
Starting = program: /dev/shm/e29/src/emacs
[Thread debugging using libthread_db en= abled]
Using host libthread_db library "/usr/lib/libthread_db.so.1&= quot;.
[New Thread 0x7ffff1355640 (LWP 210606)]
[New Thread 0x7ffff0a= 5f640 (LWP 210607)]
[Detaching after fork from child process 210608]
= [Detaching after fork from child process 210609]
[New Thread 0x7fffebfff= 640 (LWP 210610)]
[New Thread 0x7fffeb7fe640 (LWP 210611)]
[Thread 0x= 7fffeb7fe640 (LWP 210611) exited]
[New Thread 0x7fffeb7fe640 (LWP 210612= )]
[New Thread 0x7fffeaffd640 (LWP 210613)]
[Thread 0x7fffeb7fe640 (L= WP 210612) exited]
[Thread 0x7fffeaffd640 (LWP 210613) exited]

Th= read 1 "emacs" hit Breakpoint 3, handle_one_xevent (dpyinfo=3D0x5= 5555610c980, event=3D0x7fffffffd710, finish=3D0x555555e908fc <current_fi= nish>, hold_quit=3D0x7fffffffda40) at xterm.c:18393
warning: Source f= ile is more recent than executable.
18393=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (dpyinfo->supports_xkb
(gdb)=C2=A0 p xkey.state= =C2=A0=C2=A0=C2=A0 =C2=A0
No symbol "xkey" in current context.=
(gdb) p dpyinfo->hyper_mod_mask
$1 =3D 1


Po Lu <luangruo@yahoo.com>= =E6=96=BC 2022=E5=B9=B44=E6=9C=8814=E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8A= =E5=8D=8812:50=E5=AF=AB=E9=81=93=EF=BC=9A
[Seriously, please use "Reply All", oth= erwise the bug tracker cannot
record this conversation.=C2=A0 Thanks]

bg.jheng@gmail.com<= /a> writes:
> 2. because i am not familier gdb,
>=C2=A0 =C2=A0 =C2=A0i need aide :
> a) this is message wnen i enter=C2=A0 gdb /dev/shm/e29/src/emacs -q ,<= br> >
> But that probably won't help, since
> GTK native input is usually the first thing to go awry when you start<= br> > messing with modifier mapping.
>
> Can you attach a debugger to Emacs, add a breakpoint to this part of > xterm.c:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.type =3D Ke= yPress;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.serial =3D = xev->serial;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.send_event = =3D xev->send_event;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.display =3D= dpyinfo->display;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.window =3D = xev->event;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.root =3D xe= v->root;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.subwindow = =3D xev->child;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.time =3D xe= v->time;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.state =3D (= (xev->mods.effective & ~(1 << 13 | 1 << 14))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| (xev->group.effective << 13));=
>
> =3D=3D=3D>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 xkey.x =3D lrint (xev-= >event_x);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.y =3D lrint= (xev->event_y);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.x_root =3D = lrint (xev->root_x);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xkey.y_root =3D = lrint (xev->root_y);
>
> press "Shift-A", and then show the value of `xkey.state'= ?
>
> This should work for you, assuming you're using a fresh copy of Em= acs
> from the master branch:
>
>=C2=A0 =C2=A0$ gdb path/to/emacs/binary -Q
>=C2=A0 =C2=A0...
>=C2=A0 =C2=A0(gdb) break xterm.c:17399
>=C2=A0 =C2=A0... the breakpoint is hit after pressing the key
>=C2=A0 =C2=A0(gdb) p xkey.state
>
> Also, please show the value of dpyinfo->hyper_mod_mask at that time= ,
> like this:
>
>=C2=A0 =C2=A0(gdb) p dpyinfo->hyper_mod_mask
>
> If the debugger complains about certain values being optimized out, > rebuild Emacs without optimizations according to the instructions in > etc/DEBUG.
>
> Po Lu <
luan= gruo@yahoo.com> =E6=96=BC 2022=E5=B9=B44=E6=9C=8813=E6=97=A5 =E9=80= =B1=E4=B8=89 =E4=B8=8A=E5=8D=884:58=E5=AF=AB=E9=81=93=EF=BC=9A
>
>=C2=A0 bg.jheng= @gmail.com writes:
>
>=C2=A0 > 1. xmodmap is outputed:
>=C2=A0 >=C2=A0
>=C2=A0 > xmodmap:=C2=A0 up to 3 keys per modifier, (keycodes in pare= ntheses):
>=C2=A0 >
>=C2=A0 > shift=C2=A0 =C2=A0 =C2=A0 =C2=A0Shift_L (0x32),=C2=A0 Shift= _R (0x3e)
>=C2=A0 > lock=C2=A0 =C2=A0 =C2=A0
>=C2=A0 > control=C2=A0 =C2=A0 =C2=A0Control_L (0x25),=C2=A0 Control_= L (0x42),=C2=A0 Control_R (0x69)
>=C2=A0 > mod1=C2=A0 =C2=A0 =C2=A0 =C2=A0 Alt_L (0x40),=C2=A0 Alt_R (= 0x6c),=C2=A0 Meta_L (0xcd)
>=C2=A0 > mod2=C2=A0 =C2=A0 =C2=A0 =C2=A0 Num_Lock (0x4d)
>=C2=A0 > mod3=C2=A0 =C2=A0 =C2=A0 =C2=A0 ISO_Last_Group (0x87),=C2= =A0 Mode_switch (0xcb)
>=C2=A0 > mod4=C2=A0 =C2=A0 =C2=A0 =C2=A0 Super_L (0x85),=C2=A0 Super= _L (0xce),=C2=A0 Hyper_L (0xcf)
>=C2=A0 > mod5=C2=A0 =C2=A0 =C2=A0 =C2=A0 BadKey (0x5c),=C2=A0 ISO_Le= vel3_Shift (0x86)
>=C2=A0 >
>=C2=A0 > 2-1.=C2=A0 i tried these cmd:
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 ./configure=C2=A0 --with-xinput2=
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 then
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 make -j 4
>=C2=A0 >
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 after done:
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 emacs -q -xrm 'Emacs.useXIM:= false'
>=C2=A0 >
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 still the same,=C2=A0 if i press Shift+= A , minibuffer showed "H-a is undefined" and no capital letter in= puted.
>=C2=A0 >
>=C2=A0 > 2-2. could you teach me how to tuen on 'x-gtk-use-nativ= e-input' ?
>=C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 i have no comprehensive k= nowlage about linux in now.
>
>=C2=A0 =C2=A0 =C2=A0Hi,
>
>=C2=A0 >> (setq x-gtk-use-native-input t).
>
>=C2=A0 =C2=A0 =C2=A0as you expect, after excute=C2=A0 it still can'= t input capital letter with shift key.
>
>=C2=A0 >> Can you attach a debugger to Emacs, add a breakpoint to= this part of
>=C2=A0 xterm.c:
>
>=C2=A0 =C2=A0 =C2=A0unfortunally, in this step, my base knowlage not en= ough,
>=C2=A0 =C2=A0 =C2=A0here is the result:
>=C2=A0 =C2=A0 =C2=A0 =C2=A01.git clone https://github.com/e= macs-mirror/emacs=C2=A0 to=C2=A0 /dev/shm/e29/
>=C2=A0 =C2=A0 =C2=A0 =C2=A02. after ./configure then build, cd=C2=A0 ./= src
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 gdb ./emacs -q
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 first, a lot=C2=A0 message occured,<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 i put these text in ~/.config/gdb/gd= binit=C2=A0 , after google:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0add-auto-load-sa= fe-path /dev/shm/e29/src/
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0set auto-load sa= fe-path /dev/shm/e29/src/
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hope it is a right way.=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 3. then execute:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$=C2=A0 gdb ./emacs -q
>=C2=A0 Reading symbols from ./emacs...
> SIGINT is used by the debugger.
> Are you sure you want to change it? (y or n) [answered Y; input not fr= om terminal]
> DISPLAY =3D :0
> TERM =3D rxvt-unicode-256color
> Breakpoint 1 at 0x4ac18: file emacs.c, line 412.
> Breakpoint 2 at 0x129bc0: file xterm.c, line 19625.
>
> (gdb) break xterm.c:17399
> Breakpoint 3 at 0x13cb23: file xterm.c, line 18393.

You forgot to enter "run" and then press Shift-A here once the in= put
focus shifts to the Emacs window.=C2=A0 I'm sorry for not mentioning th= at
earlier.=C2=A0 Thanks.
--000000000000fc0eab05dc9bfd30--