diff options
author | crupest <crupest@outlook.com> | 2021-10-21 22:15:52 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-10-21 22:15:52 +0800 |
commit | e998a88b5ad6cc260836b3374e882e2ef67d5d35 (patch) | |
tree | 0bf82250bae0817370986a9a20750bae92a4922f /demos | |
parent | 6f1edc1604341b32e13371c8a4ad431e9a00cc87 (diff) | |
download | cru-e998a88b5ad6cc260836b3374e882e2ef67d5d35.tar.gz cru-e998a88b5ad6cc260836b3374e882e2ef67d5d35.tar.bz2 cru-e998a88b5ad6cc260836b3374e882e2ef67d5d35.zip |
...
Diffstat (limited to 'demos')
-rw-r--r-- | demos/input_method/main.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/demos/input_method/main.cpp b/demos/input_method/main.cpp index dc2e0858..cc86ce4d 100644 --- a/demos/input_method/main.cpp +++ b/demos/input_method/main.cpp @@ -37,10 +37,10 @@ int main() { auto prompt_text_layout = graphics_factory->CreateTextLayout(font, - u"Alt+F1: Enable IME\n" - u"Alt+F2: Disable IME\n" - u"Alt+F3: Complete composition.\n" - u"Alt+F4: Cancel composition."); + u"Ctrl+1: Enable IME\n" + u"Ctrl+2: Disable IME\n" + u"Ctrl+3: Complete composition.\n" + u"Ctrl+4: Cancel composition."); std::optional<CompositionText> optional_composition_text; String committed_text; @@ -102,18 +102,18 @@ int main() { window->KeyDownEvent()->AddHandler( [&input_method_context](const NativeKeyEventArgs& args) { - if (args.modifier & KeyModifiers::alt) { + if (args.modifier & KeyModifiers::ctrl) { switch (args.key) { - case KeyCode::F1: + case KeyCode::N1: input_method_context->EnableIME(); break; - case KeyCode::F2: + case KeyCode::N2: input_method_context->DisableIME(); break; - case KeyCode::F3: + case KeyCode::N3: input_method_context->CompleteComposition(); break; - case KeyCode::F4: + case KeyCode::N4: input_method_context->CancelComposition(); break; default: |