mirror of https://github.com/quasar/Quasar.git
Merge pull request #361 from d3agle/bugfixes
Remote desktop togglekey fix
This commit is contained in:
commit
142b6548de
|
@ -325,6 +325,7 @@ private void OnKeyDown(object sender, KeyEventArgs e)
|
|||
{
|
||||
if (picDesktop.Image != null && _enableKeyboardInput && IsStarted && this.ContainsFocus)
|
||||
{
|
||||
if (!IsLockKey(e.KeyCode))
|
||||
e.Handled = true;
|
||||
|
||||
if (_keysPressed.Contains(e.KeyCode))
|
||||
|
@ -341,6 +342,7 @@ private void OnKeyUp(object sender, KeyEventArgs e)
|
|||
{
|
||||
if (picDesktop.Image != null && _enableKeyboardInput && IsStarted && this.ContainsFocus)
|
||||
{
|
||||
if (!IsLockKey(e.KeyCode))
|
||||
e.Handled = true;
|
||||
|
||||
_keysPressed.Remove(e.KeyCode);
|
||||
|
@ -350,6 +352,13 @@ private void OnKeyUp(object sender, KeyEventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
private bool IsLockKey(Keys key)
|
||||
{
|
||||
return ((key & Keys.CapsLock) == Keys.CapsLock)
|
||||
|| ((key & Keys.NumLock) == Keys.NumLock)
|
||||
|| ((key & Keys.Scroll) == Keys.Scroll);
|
||||
}
|
||||
|
||||
private void btnHide_Click(object sender, EventArgs e)
|
||||
{
|
||||
panelTop.Visible = false;
|
||||
|
|
Loading…
Reference in New Issue