Update StarInput.cpp
This commit is contained in:
parent
bea100bde9
commit
f5c63fa189
@ -35,18 +35,18 @@ inline bool compareKeyMod(KeyMod input, KeyMod test) {
|
||||
Json keyModsToJson(KeyMod mod) {
|
||||
JsonArray array;
|
||||
|
||||
if ((bool)(mod & KeyMod::LShift)) array.emplace_back("LShift");
|
||||
if ((bool)(mod & KeyMod::RShift)) array.emplace_back("RShift");
|
||||
if ((bool)(mod & KeyMod::LCtrl )) array.emplace_back("LCtrl" );
|
||||
if ((bool)(mod & KeyMod::RCtrl )) array.emplace_back("RCtrl" );
|
||||
if ((bool)(mod & KeyMod::LAlt )) array.emplace_back("LAlt" );
|
||||
if ((bool)(mod & KeyMod::RAlt )) array.emplace_back("RAlt" );
|
||||
if ((bool)(mod & KeyMod::LGui )) array.emplace_back("LGui" );
|
||||
if ((bool)(mod & KeyMod::RGui )) array.emplace_back("RGui" );
|
||||
if ((bool)(mod & KeyMod::Num )) array.emplace_back("Num" );
|
||||
if ((bool)(mod & KeyMod::Caps )) array.emplace_back("Caps" );
|
||||
if ((bool)(mod & KeyMod::AltGr )) array.emplace_back("AltGr" );
|
||||
if ((bool)(mod & KeyMod::Scroll)) array.emplace_back("Scroll");
|
||||
if (bool(mod & KeyMod::LShift)) array.emplace_back("LShift");
|
||||
if (bool(mod & KeyMod::RShift)) array.emplace_back("RShift");
|
||||
if (bool(mod & KeyMod::LCtrl )) array.emplace_back("LCtrl" );
|
||||
if (bool(mod & KeyMod::RCtrl )) array.emplace_back("RCtrl" );
|
||||
if (bool(mod & KeyMod::LAlt )) array.emplace_back("LAlt" );
|
||||
if (bool(mod & KeyMod::RAlt )) array.emplace_back("RAlt" );
|
||||
if (bool(mod & KeyMod::LGui )) array.emplace_back("LGui" );
|
||||
if (bool(mod & KeyMod::RGui )) array.emplace_back("RGui" );
|
||||
if (bool(mod & KeyMod::Num )) array.emplace_back("Num" );
|
||||
if (bool(mod & KeyMod::Caps )) array.emplace_back("Caps" );
|
||||
if (bool(mod & KeyMod::AltGr )) array.emplace_back("AltGr" );
|
||||
if (bool(mod & KeyMod::Scroll)) array.emplace_back("Scroll");
|
||||
|
||||
return array.empty() ? Json() : move(array);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user