本文整理汇总了C++中FKeyEvent::GetKeyCode方法的典型用法代码示例。如果您正苦于以下问题:C++ FKeyEvent::GetKeyCode方法的具体用法?C++ FKeyEvent::GetKeyCode怎么用?C++ FKeyEvent::GetKeyCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FKeyEvent
的用法示例。
在下文中一共展示了FKeyEvent::GetKeyCode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnKeyDown
void FWebBrowserWindow::OnKeyDown(const FKeyEvent& InKeyEvent)
{
if (IsValid())
{
CefKeyEvent KeyEvent;
#if PLATFORM_MAC
KeyEvent.native_key_code = InKeyEvent.GetKeyCode();
KeyEvent.character = InKeyEvent.GetCharacter();
#else
KeyEvent.windows_key_code = InKeyEvent.GetKeyCode();
#endif
// TODO: Figure out whether this is a system key if we come across problems
/*KeyEvent.is_system_key = message == WM_SYSCHAR ||
message == WM_SYSKEYDOWN ||
message == WM_SYSKEYUP;*/
KeyEvent.type = KEYEVENT_RAWKEYDOWN;
KeyEvent.modifiers = GetCefKeyboardModifiers(InKeyEvent);
InternalCefBrowser->GetHost()->SendKeyEvent(KeyEvent);
}
}
示例2: OnKeyDown
FReply SPythonEditableText::OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent)
{
FReply Reply = FReply::Unhandled();
if (InKeyEvent.GetKeyCode() == 9)
{
Reply = FReply::Handled();
}
else if (InKeyEvent.IsControlDown() && InKeyEvent.GetKeyCode() == 13)
{
Reply = FReply::Handled();
OnExecuted.Execute();
}
else
{
Reply = SMultiLineEditableText::OnKeyDown(MyGeometry, InKeyEvent);
}
//FString test;
//test=FString::FromInt(InKeyEvent.GetKeyCode());
//InsertTextAtCursor(test);
return Reply;
}
示例3: PopulateCefKeyEvent
void FCEFWebBrowserWindow::PopulateCefKeyEvent(const FKeyEvent& InKeyEvent, CefKeyEvent& OutKeyEvent)
{
#if PLATFORM_MAC
OutKeyEvent.native_key_code = InKeyEvent.GetKeyCode();
FKey Key = InKeyEvent.GetKey();
if (Key == EKeys::BackSpace)
{
OutKeyEvent.unmodified_character = kBackspaceCharCode;
}
else if (Key == EKeys::Tab)
{
OutKeyEvent.unmodified_character = kTabCharCode;
}
else if (Key == EKeys::Enter)
{
OutKeyEvent.unmodified_character = kReturnCharCode;
}
else if (Key == EKeys::Pause)
{
OutKeyEvent.unmodified_character = NSPauseFunctionKey;
}
else if (Key == EKeys::Escape)
{
OutKeyEvent.unmodified_character = kEscapeCharCode;
}
else if (Key == EKeys::PageUp)
{
OutKeyEvent.unmodified_character = NSPageUpFunctionKey;
}
else if (Key == EKeys::PageDown)
{
OutKeyEvent.unmodified_character = NSPageDownFunctionKey;
}
else if (Key == EKeys::End)
{
OutKeyEvent.unmodified_character = NSEndFunctionKey;
}
else if (Key == EKeys::Home)
{
OutKeyEvent.unmodified_character = NSHomeFunctionKey;
}
else if (Key == EKeys::Left)
{
OutKeyEvent.unmodified_character = NSLeftArrowFunctionKey;
}
else if (Key == EKeys::Up)
{
OutKeyEvent.unmodified_character = NSUpArrowFunctionKey;
}
else if (Key == EKeys::Right)
{
OutKeyEvent.unmodified_character = NSRightArrowFunctionKey;
}
else if (Key == EKeys::Down)
{
OutKeyEvent.unmodified_character = NSDownArrowFunctionKey;
}
else if (Key == EKeys::Insert)
{
OutKeyEvent.unmodified_character = NSInsertFunctionKey;
}
else if (Key == EKeys::Delete)
{
OutKeyEvent.unmodified_character = kDeleteCharCode;
}
else if (Key == EKeys::F1)
{
OutKeyEvent.unmodified_character = NSF1FunctionKey;
}
else if (Key == EKeys::F2)
{
OutKeyEvent.unmodified_character = NSF2FunctionKey;
}
else if (Key == EKeys::F3)
{
OutKeyEvent.unmodified_character = NSF3FunctionKey;
}
else if (Key == EKeys::F4)
{
OutKeyEvent.unmodified_character = NSF4FunctionKey;
}
else if (Key == EKeys::F5)
{
OutKeyEvent.unmodified_character = NSF5FunctionKey;
}
else if (Key == EKeys::F6)
{
OutKeyEvent.unmodified_character = NSF6FunctionKey;
}
else if (Key == EKeys::F7)
{
OutKeyEvent.unmodified_character = NSF7FunctionKey;
}
else if (Key == EKeys::F8)
{
OutKeyEvent.unmodified_character = NSF8FunctionKey;
}
else if (Key == EKeys::F9)
{
//.........这里部分代码省略.........