add member alt for arg_keyboard

This commit is contained in:
Jinhao
2018-02-24 06:10:43 +08:00
parent 2ba4b612f1
commit 244416088f
3 changed files with 6 additions and 3 deletions

View File

@@ -223,6 +223,7 @@ namespace detail
{
XKeyEvent xkey;
nana::detail::platform_spec::instance().read_keystate(xkey);
arg.alt = (xkey.state & Mod1Mask);
arg.ctrl = (xkey.state & ControlMask);
arg.shift = (xkey.state & ShiftMask);
}

View File

@@ -1622,6 +1622,7 @@ namespace detail
void bedrock::get_key_state(arg_keyboard& kb)
{
kb.alt = (0 != (::GetKeyState(VK_MENU) & 0x80));
kb.ctrl = (0 != (::GetKeyState(VK_CONTROL) & 0x80));
kb.shift = (0 != (::GetKeyState(VK_SHIFT) & 0x80));
}