Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Keyboard input causing "Alert" noise/beep in Windows #118

Open
scottmudge opened this issue Jun 29, 2018 · 6 comments
Open

Keyboard input causing "Alert" noise/beep in Windows #118

scottmudge opened this issue Jun 29, 2018 · 6 comments

Comments

@scottmudge
Copy link

So I've created an OpenGL interface control as a child of the IControl class, which uses GLFW to create a context, and then an immediate-mode GUI backend to create user interface elements.

Because I am unable to create a new window handle and latch the input function callbacks to that as GLFW typically does, I'm simply overriding the in-built input virtual functions (OnMouseDown, OnMouseUp, OnKeyDown, etc), and then passing that data to my OpenGL GUI.

I'm able to successfully pass the mouse input to the UI, but I am having problems passing the keyboard input.

I can capture the key data fine using OnKeyDown (though I cannot get Ctrl/Alt/Shift, etc), but every time I hit a key, Windows creates the "Alert" beep/noise, and I can't stop it.

How can I appropriately capture keyboard input without having Windows throw a fit?

@olilarkin
Copy link
Owner

is this in a standalone app or plugin?

@scottmudge
Copy link
Author

Standalone app, the plugin variants work fine.

I think the problem lies in the fact that there is no edit control for the input to be focused into. All that exists is the child plugin window. I think creating an invisible editable control to the parent window would fix the problem.

Ideally I would like to get rid of the menu bar and parent window entirely, since the about window and settings will be taken care of by the secondary UI. I would just show the plugin window as a WS_OVERLAPPED style window, but that seems like a lot of modification to make. Especially since I would still like to use the accessory functions, like being able to request files, etc.

@olilarkin
Copy link
Owner

i would try putting a breakpoint here https://github.com/olilarkin/wdl-ol/blob/master/IPlugExamples/IPlugEffect/app_wrapper/app_dialog.cpp#L564

perhaps these keys need to be caught and forwarded

@scottmudge
Copy link
Author

Hi Oli,

Well if I change the plugin window from WS_CHILD to WS_OVERLAPPED, the beeping/alert noise stops. Of course, doing so causes the child plugin window to be a new, detached window, which is undesirable.

I think what I'll end up doing is catching all the input in the main dialog wrapper in the file you mentioed to prevent the alert tone, and then use the gainput library to act as a cross-platform input interface. This will also allow me to interface better with touch-screens, providing better future portability to android and ios.

@olilarkin
Copy link
Owner

interested to see what you do with GLFW...

@scottmudge
Copy link
Author

Hey I sent you an email about iPlug2. My private email server is often flagged as spam (I think spammers use my host's shared smtp server?), just thought I'd let you know just in case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants