unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: joakim@verona.se
To: Stefan Monnier via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: numpad doesnt seem to send kp events in wayland
Date: Thu, 24 Oct 2024 20:17:04 +0200	[thread overview]
Message-ID: <87ed45l61r.fsf@tanaka.verona.se> (raw)
In-Reply-To: <jwvjzdz0yaa.fsf-monnier+emacs@gnu.org> (Stefan Monnier via Users list for the's message of "Wed, 23 Oct 2024 09:06:44 -0400")

Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

>> using (read-key) in emacs-pgtk, both the numpad and the number row are
>> received as the same event:
>
> Lower-level is `read-event`: `read-key` has code to specifically
> "decode" key events.  [ But I doubt it'll make a difference based on
> what you posted earlier.  ]

(read-event) returns 4, for numpad 4, as you expected.

>
>> I get the same in a emacs gtk session.
>
> Hmm... so what was the other session?

I   thought emacs-pgtk and emacs was distinct on fedora, maybe I'm
misunderstanding something.

yes, both are compiled --with-pgtk lol!

so now I tried emacs-29.4-gtk+x11 -Q

and then I get "4 (translated from <kp-4>)"
on c-h k, numpad 4, so xwayland is doing something correctly in this
case, which pgtk isnt doing in the same way(imho incorrectly but what do
I know)

(and as a reminder, I run emacs-pgtk because it looks super nice on
wayland, with the scaling hints I use on my framework hidpi screen, but
emacs-29.4-gtk+x11 doesnt look good.)


>
>> Maybe gtk is doing something weird?
>
> No comment 🙂
>
>> I will need to compile some other type of emacs toolkit next I guess.
>
> I'd actually suggest a bug report.

Alright, I'll try that thanks.


>
>         Stefan
>
>
> PS: You can rewrite your macro into a function.  I.e.
>
>     (defmacro sylt-song-event-map-key (key num)
>       `(define-key cider-mode-map (kbd ,key)
>                    (lambda  ()
>                      (interactive)
>                      (cider-nrepl-sync-request:eval
>                       ,(concat "(sylt.core/song-event \"" num "\")")))))
>
> to
>
>     (defun sylt-song-event-map-key (key num)
>       (define-key cider-mode-map (kbd key)
>                   (lambda  ()
>                     (interactive)
>                     (cider-nrepl-sync-request:eval
>                      (concat "(sylt.core/song-event \"" num "\")")))))
>
> [ This needs your file to start with the `-*- lexical-binding:t -*-`
>   thingy, of course.  ]

Thanks, I'll remember to add this when I get the numpad working again :)

Regards
/Joakim
>
>
-- 
Joakim Verona
joakim@verona.se



  reply	other threads:[~2024-10-24 18:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 23:17 numpad doesnt seem to send kp events in wayland joakim
2024-10-22 21:55 ` Arsen Arsenović
2024-10-23  7:11   ` joakim
2024-10-23 13:06     ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-10-24 18:17       ` joakim [this message]
2024-10-24 20:05         ` Stefan Monnier
2024-10-25 18:21           ` joakim
2024-10-25 20:18             ` Stefan Monnier
2024-10-29 21:13               ` joakim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed45l61r.fsf@tanaka.verona.se \
    --to=joakim@verona.se \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).