A new more flexible system will be implemented in the near future
#endif
};
-unsigned modmap[Msp::Input::N_MODS_]=
-{
-#ifndef WIN32
- ShiftMask, ControlMask, Mod1Mask, Mod4Mask
-#else
- 1, 2, 4, 8
-#endif
-};
-
}
namespace Msp {
return keymap[key];
}
-unsigned mod_from_sys(unsigned mod)
-{
- unsigned result = 0;
- for(unsigned i=0; i<N_MODS_; ++i)
- if(mod&modmap[i])
- result |= 1<<i;
- return result;
-}
-
} // namespace Input
} // namespace Msp
N_KEYS_ = 0x100
};
-enum
-{
- MOD_SHIFT = 1,
- MOD_CONTROL = 2,
- MOD_ALT = 4,
- MOD_SUPER = 8,
- N_MODS_ = 4
-};
-
extern unsigned key_from_sys(unsigned);
extern unsigned key_to_sys(unsigned);
-extern unsigned mod_from_sys(unsigned);
-
} // namespace Input
} // namespace Msp