improve quick panel and fix alt+tab

This commit is contained in:
2019-03-06 13:04:53 +01:00
parent b484e495ff
commit 4a82cbbd3d
3 changed files with 11 additions and 10 deletions

View File

@@ -414,7 +414,7 @@ void init_vk_map()
{
for (int vk = 0; vk < 256; vk++)
{
if (k == (int)convert_key(k))
if (k == (int)convert_key(vk))
{
if (vkey_map.find((kKey)k) == vkey_map.end())
{
@@ -891,11 +891,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
static BYTE keys[256];
if (GetKeyboardState(keys))
{
bool alt = keys[VK_TAB] & 0x80;
bool alt = keys[VK_MENU] & 0x80;
for (auto k : vkey_map)
{
// ignore alt + tab
if (alt && k.first == kKey::KeyAlt)
if (alt && k.first == kKey::KeyTab)
continue;
bool down = keys[k.second] & 0x80;
if (App::I.keys[(int)k.first] && !down)