help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: numpad doesnt seem to send kp events in wayland


From: joakim
Subject: Re: numpad doesnt seem to send kp events in wayland
Date: Thu, 24 Oct 2024 20:17:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]