Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win32 Keyboard Bindings not right in VSTGUI #500

Closed
baconpaul opened this issue Feb 4, 2019 · 0 comments
Closed

Win32 Keyboard Bindings not right in VSTGUI #500

baconpaul opened this issue Feb 4, 2019 · 0 comments

Comments

@baconpaul
Copy link
Collaborator

VSTGUI seems to not properly propagate pressed regular keys to the gui through the keyboard listener. Inspection on Win10 shows all keys send a character 0 in onKeyDown

This code in vstgui...platform/windows/win32frame.cpp is suspect

		case WM_KEYDOWN:
		{
			VstKeyCode key {};
			if (GetAsyncKeyState (VK_SHIFT)   < 0)
				key.modifier |= MODIFIER_SHIFT;
			if (GetAsyncKeyState (VK_CONTROL) < 0)
				key.modifier |= MODIFIER_CONTROL;
			if (GetAsyncKeyState (VK_MENU)    < 0)
				key.modifier |= MODIFIER_ALTERNATE;
			key.virt = translateWinVirtualKey (wParam);
			key.character = MapVirtualKey (static_cast<UINT> (wParam), MAPVK_VK_TO_CHAR);
			if (key.virt || key.character)
			{
				key.character = std::tolower (key.character);
				if (pFrame->platformOnKeyDown (key))
					return 0;
			}

Leaving this here so I don't forget. Not sure what to do yet.

baconpaul added a commit to baconpaul/surge that referenced this issue Feb 4, 2019
The onKeyDown handler was reading the wrong part of the data
structure, so keypresses didn't navigate patches. Moreover, the
handler was over-registered. Finally, once those problems were
fixes, make + and - zoom and unzoom the UI.

Closes surge-synthesizer#496 Keyboard Hook doesn't work
Closes surge-synthesizer#479 +/- for zoom
Closes surge-synthesizer#427 Keyboard hook over-registered

Due to an error in windows VSTGUI this doesn't fully work on
windows, with the keyboard zoom not being supported there.
See issue surge-synthesizer#500 for a description of why.
@baconpaul baconpaul added this to the 1.6.0 milestone Feb 24, 2019
@baconpaul baconpaul modified the milestones: 1.6.0, 1.6.n Mar 6, 2019
baconpaul added a commit to baconpaul/surge that referenced this issue Jul 10, 2019
The onKeyDown handler was reading the wrong part of the data
structure, so keypresses didn't navigate patches. Moreover, the
handler was over-registered. Finally, once those problems were
fixes, make + and - zoom and unzoom the UI.

Closes surge-synthesizer#496 Keyboard Hook doesn't work
Closes surge-synthesizer#479 +/- for zoom
Closes surge-synthesizer#427 Keyboard hook over-registered

Due to an error in windows VSTGUI this doesn't fully work on
windows, with the keyboard zoom not being supported there.
See issue surge-synthesizer#500 for a description of why.


Former-commit-id: e0ff13f2588bbfec2ece60f9217e17522756d0fa [formerly 5aef139]
Former-commit-id: 9e8d3af55f3c457372964310ba83c19e29da1224
Former-commit-id: f8a51113f2f5e6d738efa060371ab5fbd4cf095a
@baconpaul baconpaul modified the milestones: 1.6.n, Currently Unscheduled Oct 4, 2019
@mkruselj mkruselj removed this from the Currently Unscheduled milestone Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants