本文整理汇总了C++中ci::app::KeyEvent::isMetaDown方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyEvent::isMetaDown方法的具体用法?C++ KeyEvent::isMetaDown怎么用?C++ KeyEvent::isMetaDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ci::app::KeyEvent
的用法示例。
在下文中一共展示了KeyEvent::isMetaDown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getIsBindedToModifier
bool Control::getIsBindedToModifier( ci::app::KeyEvent &event )
{
if( event.isMetaDown() && mKeyModifier == app::KeyEvent::META_DOWN )
{
return true;
}
else if ( event.isAltDown() && mKeyModifier == app::KeyEvent::ALT_DOWN )
{
return true;
}
else if( event.isControlDown() && mKeyModifier == app::KeyEvent::CTRL_DOWN )
{
return true;
}
return false;
}
示例2: getIsModifierDown
bool Control::getIsModifierDown( ci::app::KeyEvent &event )
{
if( event.isMetaDown() )
{
return true;
}
else if ( event.isAltDown() )
{
return true;
}
else if( event.isControlDown() )
{
return true;
}
else if( event.isShiftDown() )
{
return true;
}
else if( event.isAccelDown() )
{
return true;
}
return false;
}
示例3: keyDown
void TextInput::keyDown( ci::app::KeyEvent &event )
{
if( mClicked ) {
if( event.getCode() == KeyEvent::KEY_v && event.isMetaDown() ) {
if( Clipboard::hasString() ) {
setValue( Clipboard::getString() );
if( (int)mTrigger & (int)Trigger::CHANGE ) {
trigger();
}
}
}
else {
switch( event.getCode() ) {
case KeyEvent::KEY_RIGHT: {
if( mCursorPosition == mMaxDisplayLength && (int)mValue.substr( mStartIndex ).length() > mMaxDisplayLength ) {
mStartIndex++;
mDisplayValue = mValue.substr( mStartIndex, mMaxDisplayLength );
mLabelRef->setLabel( mDisplayValue );
}
else if( mCursorPosition < (int)mDisplayValue.length() ) {
mCursorPosition = mCursorPosition + 1;
}
setNeedsDisplay();
} break;
case KeyEvent::KEY_LEFT: {
if( mCursorPosition == 0 && mStartIndex > 0 ) {
mStartIndex--;
mDisplayValue = mValue.substr( mStartIndex, mMaxDisplayLength );
mLabelRef->setLabel( mDisplayValue );
}
else {
mCursorPosition = mCursorPosition > 0 ? mCursorPosition - 1 : mCursorPosition;
}
setNeedsDisplay();
} break;
case KeyEvent::KEY_DELETE:
case KeyEvent::KEY_BACKSPACE: {
deleteCharacter();
} break;
case KeyEvent::KEY_UNKNOWN:
case KeyEvent::KEY_TAB:
case KeyEvent::KEY_CLEAR:
case KeyEvent::KEY_KP0:
case KeyEvent::KEY_KP1:
case KeyEvent::KEY_KP2:
case KeyEvent::KEY_KP3:
case KeyEvent::KEY_KP4:
case KeyEvent::KEY_KP5:
case KeyEvent::KEY_KP6:
case KeyEvent::KEY_KP7:
case KeyEvent::KEY_KP8:
case KeyEvent::KEY_KP9:
case KeyEvent::KEY_KP_DIVIDE:
case KeyEvent::KEY_KP_MULTIPLY:
case KeyEvent::KEY_KP_PLUS:
case KeyEvent::KEY_KP_EQUALS:
case KeyEvent::KEY_UP:
case KeyEvent::KEY_DOWN:
case KeyEvent::KEY_INSERT:
case KeyEvent::KEY_HOME:
case KeyEvent::KEY_END:
case KeyEvent::KEY_PAGEUP:
case KeyEvent::KEY_PAGEDOWN:
case KeyEvent::KEY_F1:
case KeyEvent::KEY_F2:
case KeyEvent::KEY_F3:
case KeyEvent::KEY_F4:
case KeyEvent::KEY_F5:
case KeyEvent::KEY_F6:
case KeyEvent::KEY_F7:
case KeyEvent::KEY_F8:
case KeyEvent::KEY_F9:
case KeyEvent::KEY_F10:
case KeyEvent::KEY_F11:
case KeyEvent::KEY_F12:
case KeyEvent::KEY_F13:
case KeyEvent::KEY_F14:
case KeyEvent::KEY_F15:
case KeyEvent::KEY_NUMLOCK:
case KeyEvent::KEY_CAPSLOCK:
case KeyEvent::KEY_SCROLLOCK:
case KeyEvent::KEY_RSHIFT:
case KeyEvent::KEY_LSHIFT:
case KeyEvent::KEY_RCTRL:
case KeyEvent::KEY_LCTRL:
case KeyEvent::KEY_RALT:
case KeyEvent::KEY_LALT:
case KeyEvent::KEY_RMETA:
case KeyEvent::KEY_LMETA:
case KeyEvent::KEY_LSUPER:
case KeyEvent::KEY_RSUPER:
case KeyEvent::KEY_MODE:
case KeyEvent::KEY_COMPOSE:
case KeyEvent::KEY_HELP:
case KeyEvent::KEY_PRINT:
case KeyEvent::KEY_SYSREQ:
case KeyEvent::KEY_BREAK:
//.........这里部分代码省略.........