User Activity

  • Posted a comment on ticket #2449 on Scintilla

    As tested at https://github.com/zufuliu/notepad4/issues/609, returns 1 for WM_MOUSEHWHEEL also works for Touchpad, safe change to avoid potential break for WM_MOUSEWHEEL: - return 1; + // return 1 for Logitech mouse, https://www.pretentiousname.com/setpoint_hwheel/index.html + return (iMessage == WM_MOUSEHWHEEL) ? 1 : 0;

  • Posted a comment on ticket #2449 on Scintilla

    Find some articles about GetMessageExtraInfo(): https://devblogs.microsoft.com/oldnewthing/20101129-00/?p=12173 https://learn.microsoft.com/en-us/answers/questions/285548/getmessageextrainfo-signature-missing-for-touch-in https://github.com/libsdl-org/SDL/issues/3316 The last message on SDL issue says it returns zero on Win 10 (tested on Win 11, also got zero), but here is GetCurrentInputMessageSource() that correctly returns IMDT_MOUSE + IMO_HARDWARE for MK_SHIFT + WM_MOUSEWHEEL. https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getcurrentinputmessagesource...

  • Posted a comment on ticket #2449 on Scintilla

    Touch and Touchpad have similar behaviors/gestures: https://support.microsoft.com/en-us/windows/touch-gestures-for-windows-a9d28305-4818-a5df-4e2b-e5590f850741#WindowsVersion=Windows_11 The difference may be the lower 8 bits: https://learn.microsoft.com/en-us/windows/win32/tablet/system-events-and-mouse-messages#distinguishing-pen-input-from-mouse-and-touch The lower 8 bits returned from GetMessageExtraInfo are variable. Of those bits, 7 (the lower 7, masked by 0x7F) are used to represent the cursor...

  • Posted a comment on ticket #2449 on Scintilla

    Also changed return value It seems better to limit it to Logi mouse (mouse returns 1 and touchpad returns 0 are the tested combinations): @@ -171,6 +171,14 @@ } } +inline bool IsMouseEvent() noexcept { + // Distinguishing Pen Input from Mouse and Touch + // https://learn.microsoft.com/en-us/windows/win32/tablet/system-events-and-mouse-messages + constexpr DWORD MI_WP_SIGNATURE = 0xFF515700; + constexpr DWORD SIGNATURE_MASK = 0xFFFFFF00; + return (::GetMessageExtraInfo() & SIGNATURE_MASK) != MI_WP_SIGNATURE;...

  • Modified a comment on ticket #2449 on Scintilla

    Maybe be better patch, needs comments/references for reverse direction. - const int charsToScroll = charsPerScroll * wheelDelta.Actions(); + int charsToScroll = charsPerScroll * wheelDelta.Actions(); + if (iMessage == WM_MOUSEHWHEEL) { + // horizontal wheelDelta has opposite sign/direction + charsToScroll = -charsToScroll; + }

  • Posted a comment on ticket #2449 on Scintilla

    Maybe be better patch, needs comments/references for reverse direction. - const int charsToScroll = charsPerScroll * wheelDelta.Actions(); + int charsToScroll = charsPerScroll * wheelDelta.Actions(); + if (iMessage == WM_MOUSEHWHEEL) { + // horizontal scroll is in reverse direction + charsToScroll = -charsToScroll; + }

  • Modified ticket #2449 on Scintilla

    Horizontal scrolling with mouse is backwards

  • Posted a comment on ticket #2449 on Scintilla

    WM_MOUSEHWHEEL produces a positive value when scrolled right and negative when scrolled left. Is this still true when scroll direction is reversed? see https://github.com/zufuliu/notepad4/issues/609#issuecomment-1417413299

View All

Personal Data

Username:
zufuliu
Joined:
2009-05-22 05:19:29

Projects

This is a list of open source software projects that Zufu Liu is associated with:

Personal Tools