PDCurses icon indicating copy to clipboard operation
PDCurses copied to clipboard

BUTTON1_DOUBLE_CLICKED is being returned while mouseinterval(0)

Open GiorgosXou opened this issue 4 years ago • 4 comments

while BUTTON1_CLICKED and BUTTON1_TRIPLE_CLICKED events are being ignored\replaced with _PRESSED\_RELEASED events when mouseinterval(0) (as they should), for some reason BUTTON1_DOUBLE_CLICKED event is being returned instead of _PRESSED\_RELEASED.

GiorgosXou avatar Dec 23 '21 22:12 GiorgosXou

I assume this is specific to one platform (wincon)?

wmcbrine avatar Dec 23 '21 22:12 wmcbrine

yes

GiorgosXou avatar Dec 23 '21 22:12 GiorgosXou

In the Windows Console, BUTTON_DOUBLE_CLICKED is actually returned directly as an event by the operating system, rather than being composed by PDCurses out of press/release events. I'm not sure how this can be changed.

wmcbrine avatar Dec 24 '21 19:12 wmcbrine

At some point, it may be possible to use VT/xterm control sequences for mouse (and keyboard) input. Those sequences return a stream of presses and releases, leaving it up to you to synthesize clicks and double-clicks and triple-clicks.

At present, I think Microsoft's concept of such sequences appears to remain is a little sketchy. I've seen it return two consecutive presses when you've done a press and a release, or that the released button differs from the one you pressed. (Should note I've not investigated all that thoroughly. It's also possible that Microsoft, having "embraced" VT/xterm sequences, is now "extending" them.)

Bill-Gray avatar Dec 24 '21 21:12 Bill-Gray