emacs-devel
[Top][All Lists]
Advanced

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

Re: platforms with crippled mice or (error "mouse-yank-primary must be b


From: Charles A. Roelli
Subject: Re: platforms with crippled mice or (error "mouse-yank-primary must be bound to an event with parameters")
Date: Sat, 21 Oct 2017 16:15:31 +0200

Looks like a bug.  When you add the key translation and type
s-mouse-1, the mouse click event ends up losing its location
information.

For example, the following:

(s-mouse-1 (#<window 3 on *scratch*> 227 (116 . 92) 143676325 nil 227 (16 . 5) 
nil (116 . 12) (7 . 16)))

gets turned into just:

mouse-2

which leads to the error about the missing parameters.

It happens in this part of keyboard.c:

      /* Does mock_input indicate that we are re-reading a key sequence?  */
      if (t < mock_input)
        {
          key = keybuf[t];
          add_command_key (key);
          if (current_kboard->immediate_echo)
            {
              /* Set immediate_echo to false so as to force echo_now to
                 redisplay (it will set immediate_echo right back to true).  */
              current_kboard->immediate_echo = false;
              echo_now ();
            }
        }

Note also the comments later on in keyboard.c, which imply that
function key expansion is not yet able to generate or handle mouse
events properly.

> Beyond that, only function key expansion could
> create more than two keys, but that should never
> generate mouse events, so it's okay to zero
> mock_input in that case too.

> FIXME: The above paragraph seems just plain
> wrong, if you consider things like
> xterm-mouse-mode.  -stef



reply via email to

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