guile-user
[Top][All Lists]
Advanced

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

guile-gi: scancode->keyval?


From: Jan Nieuwenhuizen
Subject: guile-gi: scancode->keyval?
Date: Thu, 06 Jun 2019 22:16:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi Mike,

I've update the Guix package and started using (send event
(get-scancode)), which works great.  However, scancodes are somewhat
inconvenient, iwbn to get the keyval or character through
gdk-keyval-to-unicode.

I would expect `get-keyval' and `get-keycode' methods on event but only
found predicate-like variants:

   (send event (get-keyval?)) => (#t 0)
   (send event (get-keycode?)) => (#t 0)

Hmm.

Then I went to look for a more low level function using the Keymap

    (let ((keymap (Keymap-get-default)))

also works and then I'm lost again...something like this might work

    (send keymap (translate-keyboard-state? scancode MODIFIER_TYPE_SHIFT_MASK 
MODIFIER_TYPE_SHIFT_MASK))

=>

    GuileGI:ERROR:gi_giargument.c:1665:convert_interface_arg_to_object: 
assertion failed: (type_tag == GI_TYPE_TAG_INTERFACE)

Can you help me with this?

Greetings,
janneke

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



reply via email to

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