Here is the code:
browserControl.KeyDown += new System.Windows.Forms.KeyEventHandler(BrowserControl_KeyDown);
private void BrowserControl_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.E)
MessageBox.Show("E");
}
I assumed that when i entered the browserControl (a CefSharp ChromiumWebBrowser), it will simply give me a message box with the message "E". Obviously! But no, absolutely nothing i am trying to make something there but i don't think i would download a browser where you get stuck in fullscreen mode because none of the shortcut keys work.
Here is another solution i searched up and appearently should work, and it does if i click a button outside the browser, but not when i need it:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.E)
{
MessageBox.Show("E.. A... GAMES");
}
return base.ProcessCmdKey(ref msg, keyData);
}
I mean come on! I am overriding the whole key process, and still gives me absolutely nothing. What?