Skip to content

Commit

Permalink
Fix for GH ticket #27: Enable F10 key in Windows when using native fi…
Browse files Browse the repository at this point in the history
…lters
  • Loading branch information
pedrolcl committed Aug 4, 2024
1 parent cc116f4 commit ecee380
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[===========================================================================[
Virtual MIDI Piano Keyboard
Copyright (C) 2008-2023 Pedro Lopez-Cabanillas <[email protected]>
Copyright (C) 2008-2024 Pedro Lopez-Cabanillas <[email protected]>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -19,7 +19,7 @@ with this program; If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.16)

project( VMPK
VERSION 0.9.0
VERSION 0.9.1
LANGUAGES CXX
DESCRIPTION "Virtual MIDI Piano Keyboard"
HOMEPAGE_URL "https://vmpk.sourceforge.io/"
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-08-04
* Fix for GH ticket #27: Enable F10 key in Windows when using native filters

2023-12-30
* Release 0.9.0

Expand Down
1 change: 0 additions & 1 deletion cmake_admin/DeploymentUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ if (WIN32 AND WINDEPLOYQT_EXECUTABLE)
COMMAND "${WINDEPLOYQT_EXECUTABLE}"
#--verbose=2
"-network"
"-no-angle"
"-no-opengl-sw"
"$<TARGET_FILE:${DEPLOYMENT_TARGET}>"
COMMENT "Running windeployqt..."
Expand Down
9 changes: 5 additions & 4 deletions src/nativefilter.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
MIDI Virtual Piano Keyboard
Copyright (C) 2008-2023, Pedro Lopez-Cabanillas <[email protected]>
Copyright (C) 2008-2024, Pedro Lopez-Cabanillas <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -105,12 +105,13 @@ bool NativeFilter::nativeEventFilter(const QByteArray &eventType, void *message,
#if defined(Q_OS_WIN)
bool isRepeat = false;
MSG* msg = static_cast<MSG *>(message);
if (msg->message == WM_KEYDOWN || msg->message == WM_KEYUP) {
if (msg->message == WM_KEYDOWN || msg->message == WM_KEYUP ||
msg->message == WM_SYSKEYDOWN || msg->message == WM_SYSKEYUP) {
int keycode = HIWORD(msg->lParam) & 0xff;
isRepeat = (msg->message == WM_KEYDOWN) &&
isRepeat = (msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN) &&
((HIWORD(msg->lParam) & 0x4000) != 0);
if (!isRepeat) {
if ( msg->message == WM_KEYDOWN )
if ( msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN )
return m_handler->handleKeyPressed(keycode);
//qDebug() << "key pressed:" << keycode;
else
Expand Down

0 comments on commit ecee380

Please sign in to comment.