1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef KEY_EVENT_H 16 #define KEY_EVENT_H 17 18 #include <memory> 19 #include <vector> 20 21 #include "nocopyable.h" 22 #include "parcel.h" 23 24 #include "input_event.h" 25 26 namespace OHOS { 27 namespace MMI { 28 class KeyEvent : public InputEvent { 29 public: 30 /** 31 * 未知的功能按键 32 * 33 * @since 9 34 */ 35 static const int32_t UNKOWN_FUNCTION_KEY; 36 37 /** 38 * Num Lock功能按键 39 * 40 * @since 9 41 */ 42 static const int32_t NUM_LOCK_FUNCTION_KEY; 43 44 /** 45 * Caps Lock功能按键 46 * 47 * @since 9 48 */ 49 static const int32_t CAPS_LOCK_FUNCTION_KEY; 50 51 /** 52 * Scroll Lock功能按键 53 * 54 * @since 9 55 */ 56 static const int32_t SCROLL_LOCK_FUNCTION_KEY; 57 58 /** 59 * Function (Fn) key 60 * 61 * @since 9 62 */ 63 static const int32_t KEYCODE_FN; 64 65 /** 66 * Unknown keycode 67 * 68 * 69 * @since 9 70 */ 71 static const int32_t KEYCODE_UNKNOWN; 72 73 /** 74 * Home key 75 * <p>This key is processed by the framework and will never be sent to the application. 76 * 77 * @since 9 78 */ 79 static const int32_t KEYCODE_HOME; 80 81 /** 82 * Back key 83 * 84 * @since 9 85 */ 86 static const int32_t KEYCODE_BACK; 87 88 /** 89 * Call key 90 * 91 * @since 9 92 */ 93 static const int32_t KEYCODE_CALL; 94 95 /** 96 * End Call key 97 * 98 * @since 9 99 */ 100 static const int32_t KEYCODE_ENDCALL; 101 102 /** 103 * Clear key 104 * 105 * @since 9 106 */ 107 static const int32_t KEYCODE_CLEAR; 108 109 /** 110 * Headset Hook key 111 * <p>This key is used to end a call and stop media. 112 * 113 * @since 9 114 */ 115 static const int32_t KEYCODE_HEADSETHOOK; 116 117 /** 118 * Focus key 119 * <p>This key is used to enable focus for the camera. 120 * 121 * @since 9 122 */ 123 static const int32_t KEYCODE_FOCUS; 124 125 /** 126 * Notification key 127 * 128 * @since 9 129 */ 130 static const int32_t KEYCODE_NOTIFICATION; 131 132 /** 133 * Search key 134 * 135 * @since 9 136 */ 137 static const int32_t KEYCODE_SEARCH; 138 139 /** 140 * Play/Pause media key 141 * 142 * @since 9 143 */ 144 static const int32_t KEYCODE_MEDIA_PLAY_PAUSE; 145 146 /** 147 * Stop media key 148 * 149 * @since 9 150 */ 151 static const int32_t KEYCODE_MEDIA_STOP; 152 153 /** 154 * Play Next media key 155 * 156 * @since 9 157 */ 158 static const int32_t KEYCODE_MEDIA_NEXT; 159 160 /** 161 * Play Previous media key 162 * 163 * @since 9 164 */ 165 static const int32_t KEYCODE_MEDIA_PREVIOUS; 166 167 /** 168 * Rewind media key 169 * 170 * @since 9 171 */ 172 static const int32_t KEYCODE_MEDIA_REWIND; 173 174 /** 175 * Fast Forward media key 176 * 177 * @since 9 178 */ 179 static const int32_t KEYCODE_MEDIA_FAST_FORWARD; 180 181 /** 182 * Volume Up key 183 * 184 * @since 9 185 */ 186 static const int32_t KEYCODE_VOLUME_UP; 187 188 /** 189 * Volume Down key 190 * 191 * @since 9 192 */ 193 static const int32_t KEYCODE_VOLUME_DOWN; 194 195 /** 196 * Power key 197 * 198 * @since 9 199 */ 200 static const int32_t KEYCODE_POWER; 201 202 /** 203 * Camera key 204 * <p>This key is used to start the camera or take photos. 205 * 206 * @since 9 207 */ 208 static const int32_t KEYCODE_CAMERA; 209 210 /** 211 * Voice Assistant key 212 * <p>This key is used to wake up the voice assistant. 213 * 214 * @since 9 215 */ 216 static const int32_t KEYCODE_VOICE_ASSISTANT; 217 218 /** 219 * Custom key 1 220 * <p>The actions mapping to the custom keys are user-defined. 221 * Key values 521-529 are reserved for custom keys. 222 * 223 * @since 9 224 */ 225 static const int32_t KEYCODE_CUSTOM1; 226 227 /** 228 * Volume Mute key 229 * 230 * @since 9 231 */ 232 static const int32_t KEYCODE_VOLUME_MUTE; 233 234 /** 235 * Mute key 236 * 237 * @since 9 238 */ 239 static const int32_t KEYCODE_MUTE; 240 241 /** 242 * Brightness Up key 243 * 244 * @since 9 245 */ 246 static const int32_t KEYCODE_BRIGHTNESS_UP; 247 248 /** 249 * Brightness Down key 250 * 251 * @since 9 252 */ 253 static const int32_t KEYCODE_BRIGHTNESS_DOWN; 254 255 /** 256 * General-purpose key 1 on wearables 257 * 258 * @since 3 259 */ 260 static const int32_t KEYCODE_WEAR_1; 261 262 /** 263 * Number 0 key 264 * 265 * @since 9 266 */ 267 static const int32_t KEYCODE_0; 268 269 /** 270 * Number 1 key 271 * 272 * @since 9 273 */ 274 static const int32_t KEYCODE_1; 275 276 /** 277 * Number 2 key 278 * 279 * @since 9 280 */ 281 static const int32_t KEYCODE_2; 282 283 /** 284 * Number 3 key 285 * 286 * @since 9 287 */ 288 static const int32_t KEYCODE_3; 289 290 /** 291 * Number 4 key 292 * 293 * @since 9 294 */ 295 static const int32_t KEYCODE_4; 296 297 /** 298 * Number 5 key 299 * 300 * @since 9 301 */ 302 static const int32_t KEYCODE_5; 303 304 /** 305 * Number 6 key 306 * 307 * @since 9 308 */ 309 static const int32_t KEYCODE_6; 310 311 /** 312 * Number 7 key 313 * 314 * @since 9 315 */ 316 static const int32_t KEYCODE_7; 317 318 /** 319 * Number 8 key 320 * 321 * @since 9 322 */ 323 static const int32_t KEYCODE_8; 324 325 /** 326 * Number 9 key 327 * 328 * @since 9 329 */ 330 static const int32_t KEYCODE_9; 331 332 /** 333 * Star (*) key 334 * 335 * @since 9 336 */ 337 static const int32_t KEYCODE_STAR; 338 339 /** 340 * Pound (#) key 341 * 342 * @since 9 343 */ 344 static const int32_t KEYCODE_POUND; 345 346 /** 347 * Directional Pad Up key 348 * <p>This key may be synthesized from trackball motions. 349 * 350 * @since 9 351 */ 352 static const int32_t KEYCODE_DPAD_UP; 353 354 /** 355 * Directional Pad Down key 356 * <p>This key may be synthesized from trackball motions. 357 * 358 * @since 9 359 */ 360 static const int32_t KEYCODE_DPAD_DOWN; 361 362 /** 363 * Directional Pad Left key 364 * <p>This key may be synthesized from trackball motions. 365 * 366 * @since 9 367 */ 368 static const int32_t KEYCODE_DPAD_LEFT; 369 370 /** 371 * Directional Pad Right key 372 * <p>This key may be synthesized from trackball motions. 373 * 374 * @since 9 375 */ 376 static const int32_t KEYCODE_DPAD_RIGHT; 377 378 /** 379 * Directional Pad Center key 380 * <p>This key may be synthesized from trackball motions. 381 * 382 * @since 9 383 */ 384 static const int32_t KEYCODE_DPAD_CENTER; 385 386 /** 387 * Letter A key 388 * 389 * @since 9 390 */ 391 static const int32_t KEYCODE_A; 392 393 /** 394 * Letter B key 395 * 396 * @since 9 397 */ 398 static const int32_t KEYCODE_B; 399 400 /** 401 * Letter C key 402 * 403 * @since 9 404 */ 405 static const int32_t KEYCODE_C; 406 407 /** 408 * Letter D key 409 * 410 * @since 9 411 */ 412 static const int32_t KEYCODE_D; 413 414 /** 415 * Letter E key 416 * 417 * @since 9 418 */ 419 static const int32_t KEYCODE_E; 420 421 /** 422 * Letter F key 423 * 424 * @since 9 425 */ 426 static const int32_t KEYCODE_F; 427 428 /** 429 * Letter G key 430 * 431 * @since 9 432 */ 433 static const int32_t KEYCODE_G; 434 435 /** 436 * Letter H key 437 * 438 * @since 9 439 */ 440 static const int32_t KEYCODE_H; 441 442 /** 443 * Letter I key 444 * 445 * @since 9 446 */ 447 static const int32_t KEYCODE_I; 448 449 /** 450 * Letter J key 451 * 452 * @since 9 453 */ 454 static const int32_t KEYCODE_J; 455 456 /** 457 * Letter K key 458 * 459 * @since 9 460 */ 461 static const int32_t KEYCODE_K; 462 463 /** 464 * Letter L key 465 * 466 * @since 9 467 */ 468 static const int32_t KEYCODE_L; 469 470 /** 471 * Letter M key 472 * 473 * @since 9 474 */ 475 static const int32_t KEYCODE_M; 476 477 /** 478 * Letter N key 479 * 480 * @since 9 481 */ 482 static const int32_t KEYCODE_N; 483 484 /** 485 * Letter O key 486 * 487 * @since 9 488 */ 489 static const int32_t KEYCODE_O; 490 491 /** 492 * Letter P key 493 * 494 * @since 9 495 */ 496 static const int32_t KEYCODE_P; 497 498 /** 499 * Letter Q key 500 * 501 * @since 9 502 */ 503 static const int32_t KEYCODE_Q; 504 505 /** 506 * Letter R key 507 * 508 * @since 9 509 */ 510 static const int32_t KEYCODE_R; 511 512 /** 513 * Letter S key 514 * 515 * @since 9 516 */ 517 static const int32_t KEYCODE_S; 518 519 /** 520 * Letter T key 521 * 522 * @since 9 523 */ 524 static const int32_t KEYCODE_T; 525 526 /** 527 * Letter U key 528 * 529 * @since 9 530 */ 531 static const int32_t KEYCODE_U; 532 533 /** 534 * Letter V key 535 * 536 * @since 9 537 */ 538 static const int32_t KEYCODE_V; 539 540 /** 541 * Letter W key 542 * 543 * @since 9 544 */ 545 static const int32_t KEYCODE_W; 546 547 /** 548 * Letter X key 549 * 550 * @since 9 551 */ 552 static const int32_t KEYCODE_X; 553 554 /** 555 * Letter Y key 556 * 557 * @since 9 558 */ 559 static const int32_t KEYCODE_Y; 560 561 /** 562 * Letter Z key 563 * 564 * @since 9 565 */ 566 static const int32_t KEYCODE_Z; 567 568 /** 569 * Semicolon (;) key 570 * 571 * @since 9 572 */ 573 static const int32_t KEYCODE_COMMA; 574 575 /** 576 * Period (.) key 577 * 578 * @since 9 579 */ 580 static const int32_t KEYCODE_PERIOD; 581 582 /** 583 * Left Alt modifier key 584 * 585 * @since 9 586 */ 587 static const int32_t KEYCODE_ALT_LEFT; 588 589 /** 590 * Right Alt modifier key 591 * 592 * @since 9 593 */ 594 static const int32_t KEYCODE_ALT_RIGHT; 595 596 /** 597 * Left Shift modifier key 598 * 599 * @since 9 600 */ 601 static const int32_t KEYCODE_SHIFT_LEFT; 602 603 /** 604 * Right Shift modifier key 605 * 606 * @since 9 607 */ 608 static const int32_t KEYCODE_SHIFT_RIGHT; 609 610 /** 611 * Tab key 612 * 613 * @since 9 614 */ 615 static const int32_t KEYCODE_TAB; 616 617 /** 618 * Space key 619 * 620 * @since 9 621 */ 622 static const int32_t KEYCODE_SPACE; 623 624 /** 625 * Symbol modifier key 626 * <p>This key is used to input alternate symbols. 627 * 628 * @since 9 629 */ 630 static const int32_t KEYCODE_SYM; 631 632 /** 633 * Explorer function key 634 * <p>This key is used to launch a browser application. 635 * 636 * @since 9 637 */ 638 static const int32_t KEYCODE_EXPLORER; 639 640 /** 641 * Email function key 642 * <p>This key is used to launch an email application. 643 * 644 * @since 9 645 */ 646 static const int32_t KEYCODE_ENVELOPE; 647 648 /** 649 * Enter key 650 * 651 * @since 9 652 */ 653 static const int32_t KEYCODE_ENTER; 654 655 /** 656 * Backspace key 657 * <p>Unlike {@link #static const int32_t KEYCODE_FORWARD_DEL}, 658 * this key is used to delete characters before the insertion point. 659 * 660 * @since 9 661 */ 662 static const int32_t KEYCODE_DEL; 663 664 /** 665 * Backtick (') key 666 * 667 * @since 9 668 */ 669 static const int32_t KEYCODE_GRAVE; 670 671 /** 672 * Minus (-) key 673 * 674 * @since 9 675 */ 676 static const int32_t KEYCODE_MINUS; 677 678 /** 679 * Equals (=) key 680 * 681 * @since 9 682 */ 683 static const int32_t KEYCODE_EQUALS; 684 685 /** 686 * Left bracket ([) key 687 * 688 * @since 9 689 */ 690 static const int32_t KEYCODE_LEFT_BRACKET; 691 692 /** 693 * Right bracket (]) key 694 * 695 * @since 9 696 */ 697 static const int32_t KEYCODE_RIGHT_BRACKET; 698 699 /** 700 * Backslash (\) key 701 * 702 * @since 9 703 */ 704 static const int32_t KEYCODE_BACKSLASH; 705 706 /** 707 * Semicolon (;) key 708 * 709 * @since 9 710 */ 711 static const int32_t KEYCODE_SEMICOLON; 712 713 /** 714 * Apostrophe (') key 715 * 716 * @since 9 717 */ 718 static const int32_t KEYCODE_APOSTROPHE; 719 720 /** 721 * Slash (/) key 722 * 723 * @since 9 724 */ 725 static const int32_t KEYCODE_SLASH; 726 727 /** 728 * At (@) key 729 * 730 * @since 9 731 */ 732 static const int32_t KEYCODE_AT; 733 734 /** 735 * Plus (+) key 736 * 737 * @since 9 738 */ 739 static const int32_t KEYCODE_PLUS; 740 741 /** 742 * Menu key 743 * 744 * @since 9 745 */ 746 static const int32_t KEYCODE_MENU; 747 748 /** 749 * Page Up key 750 * 751 * @since 9 752 */ 753 static const int32_t KEYCODE_PAGE_UP; 754 755 /** 756 * Page Down key 757 * 758 * @since 9 759 */ 760 static const int32_t KEYCODE_PAGE_DOWN; 761 762 /** 763 * Escape key 764 * 765 * @since 9 766 */ 767 static const int32_t KEYCODE_ESCAPE; 768 769 /** 770 * Forward Delete key 771 * <p>Unlike {@link #static const int32_t KEYCODE_DEL}, 772 * this key is used to delete characters ahead of the insertion point. 773 * 774 * @since 9 775 */ 776 static const int32_t KEYCODE_FORWARD_DEL; 777 778 /** 779 * Left Control modifier key 780 * 781 * @since 9 782 */ 783 static const int32_t KEYCODE_CTRL_LEFT; 784 785 /** 786 * Right Control modifier key 787 * 788 * @since 9 789 */ 790 static const int32_t KEYCODE_CTRL_RIGHT; 791 792 /** 793 * Caps Lock key 794 * 795 * @since 9 796 */ 797 static const int32_t KEYCODE_CAPS_LOCK; 798 799 /** 800 * Scroll Lock key 801 * 802 * @since 9 803 */ 804 static const int32_t KEYCODE_SCROLL_LOCK; 805 806 /** 807 * Left Meta modifier key 808 * 809 * @since 9 810 */ 811 static const int32_t KEYCODE_META_LEFT; 812 813 /** 814 * Right Meta modifier key 815 * 816 * @since 9 817 */ 818 static const int32_t KEYCODE_META_RIGHT; 819 820 /** 821 * Function modifier key 822 * 823 * @since 9 824 */ 825 static const int32_t KEYCODE_FUNCTION; 826 827 /** 828 * System Request/Print Screen key 829 * 830 * @since 9 831 */ 832 static const int32_t KEYCODE_SYSRQ; 833 834 /** 835 * Break/Pause key 836 * 837 * @since 9 838 */ 839 static const int32_t KEYCODE_BREAK; 840 841 /** 842 * Home Movement key 843 * <p>This key is used to scroll or move the cursor around to the start of a line or to the 844 * top of a list. 845 * 846 * @since 9 847 */ 848 static const int32_t KEYCODE_MOVE_HOME; 849 850 /** 851 * End Movement key 852 * <p>This key is used to scroll or move the cursor around to the end of a line or to the 853 * bottom of a list. 854 * 855 * @since 9 856 */ 857 static const int32_t KEYCODE_MOVE_END; 858 859 /** 860 * Insert key 861 * <p>This key is used to toggle the insert or overwrite edit mode. 862 * 863 * @since 9 864 */ 865 static const int32_t KEYCODE_INSERT; 866 867 /** 868 * Forward key 869 * <p>This key is used to navigate forward in the history stack. 870 * It is a complement of {@link #static const int32_t KEYCODE_BACK}. 871 * 872 * @since 9 873 */ 874 static const int32_t KEYCODE_FORWARD; 875 876 /** 877 * Play media key 878 * 879 * @since 9 880 */ 881 static const int32_t KEYCODE_MEDIA_PLAY; 882 883 /** 884 * Pause media key 885 * 886 * @since 9 887 */ 888 static const int32_t KEYCODE_MEDIA_PAUSE; 889 890 /** 891 * Close media key 892 * <p>This key can be used to close a CD tray, for example. 893 * 894 * @since 9 895 */ 896 static const int32_t KEYCODE_MEDIA_CLOSE; 897 898 /** 899 * Eject media key 900 * <p>This key can be used to eject a CD tray, for example. 901 * 902 * @since 9 903 */ 904 static const int32_t KEYCODE_MEDIA_EJECT; 905 906 /** 907 * Record media key 908 * 909 * @since 9 910 */ 911 static const int32_t KEYCODE_MEDIA_RECORD; 912 913 /** 914 * F1 key 915 * 916 * @since 9 917 */ 918 static const int32_t KEYCODE_F1; 919 920 /** 921 * F2 key 922 * 923 * @since 9 924 */ 925 static const int32_t KEYCODE_F2; 926 927 /** 928 * F3 key 929 * 930 * @since 9 931 */ 932 static const int32_t KEYCODE_F3; 933 934 /** 935 * F4 key 936 * 937 * @since 9 938 */ 939 static const int32_t KEYCODE_F4; 940 941 /** 942 * F5 key 943 * 944 * @since 9 945 */ 946 static const int32_t KEYCODE_F5; 947 948 /** 949 * F6 key 950 * 951 * @since 9 952 */ 953 static const int32_t KEYCODE_F6; 954 955 /** 956 * F7 key 957 * 958 * @since 9 959 */ 960 static const int32_t KEYCODE_F7; 961 962 /** 963 * F8 key 964 * 965 * @since 9 966 */ 967 static const int32_t KEYCODE_F8; 968 969 /** 970 * F9 key 971 * 972 * @since 9 973 */ 974 static const int32_t KEYCODE_F9; 975 976 /** 977 * F10 key 978 * 979 * @since 9 980 */ 981 static const int32_t KEYCODE_F10; 982 983 /** 984 * F11 key 985 * 986 * @since 9 987 */ 988 static const int32_t KEYCODE_F11; 989 990 /** 991 * F12 key 992 * 993 * @since 9 994 */ 995 static const int32_t KEYCODE_F12; 996 997 /** 998 * Number Lock key 999 * <p>This key is used to alter the behavior of other keys on the numeric keypad. 1000 * 1001 * @since 9 1002 */ 1003 static const int32_t KEYCODE_NUM_LOCK; 1004 1005 /** 1006 * Number 0 key on the numeric keypad 1007 * 1008 * @since 9 1009 */ 1010 static const int32_t KEYCODE_NUMPAD_0; 1011 1012 /** 1013 * Number 1 key on the numeric keypad 1014 * 1015 * @since 9 1016 */ 1017 static const int32_t KEYCODE_NUMPAD_1; 1018 1019 /** 1020 * Number 2 key on the numeric keypad 1021 * 1022 * @since 9 1023 */ 1024 static const int32_t KEYCODE_NUMPAD_2; 1025 1026 /** 1027 * Number 3 key on the numeric keypad 1028 * 1029 * @since 9 1030 */ 1031 static const int32_t KEYCODE_NUMPAD_3; 1032 1033 /** 1034 * Number 4 key on the numeric keypad 1035 * 1036 * @since 9 1037 */ 1038 static const int32_t KEYCODE_NUMPAD_4; 1039 1040 /** 1041 * Number 5 key on the numeric keypad 1042 * 1043 * @since 9 1044 */ 1045 static const int32_t KEYCODE_NUMPAD_5; 1046 1047 /** 1048 * Number 6 key on the numeric keypad 1049 * 1050 * @since 9 1051 */ 1052 static const int32_t KEYCODE_NUMPAD_6; 1053 1054 /** 1055 * Number 7 key on the numeric keypad 1056 * 1057 * @since 9 1058 */ 1059 static const int32_t KEYCODE_NUMPAD_7; 1060 1061 /** 1062 * Number 8 key on the numeric keypad 1063 * 1064 * @since 9 1065 */ 1066 static const int32_t KEYCODE_NUMPAD_8; 1067 1068 /** 1069 * Number 9 key on the numeric keypad 1070 * 1071 * @since 9 1072 */ 1073 static const int32_t KEYCODE_NUMPAD_9; 1074 1075 /** 1076 * Slash (/) key (for division) on the numeric keypad 1077 * 1078 * @since 9 1079 */ 1080 static const int32_t KEYCODE_NUMPAD_DIVIDE; 1081 1082 /** 1083 * Star (*) key (for multiplication) on the numeric keypad 1084 * 1085 * @since 9 1086 */ 1087 static const int32_t KEYCODE_NUMPAD_MULTIPLY; 1088 1089 /** 1090 * Minus (-) key (for subtraction) on the numeric keypad 1091 * 1092 * @since 9 1093 */ 1094 static const int32_t KEYCODE_NUMPAD_SUBTRACT; 1095 1096 /** 1097 * Plus (+) key (for addition) on the numeric keypad 1098 * 1099 * @since 9 1100 */ 1101 static const int32_t KEYCODE_NUMPAD_ADD; 1102 1103 /** 1104 * Dot (.) key (for decimals or digit grouping) on the 1105 * numeric keypad 1106 * 1107 * @since 9 1108 */ 1109 static const int32_t KEYCODE_NUMPAD_DOT; 1110 1111 /** 1112 * Comma (,) key (for decimals or digit grouping) on the 1113 * numeric keypad 1114 * 1115 * @since 9 1116 */ 1117 static const int32_t KEYCODE_NUMPAD_COMMA; 1118 1119 /** 1120 * Enter key on the numeric keypad 1121 * 1122 * @since 9 1123 */ 1124 static const int32_t KEYCODE_NUMPAD_ENTER; 1125 1126 /** 1127 * Equals (=) key on the numeric keypad 1128 * 1129 * @since 9 1130 */ 1131 static const int32_t KEYCODE_NUMPAD_EQUALS; 1132 1133 /** 1134 * Left parentheses (() key on the numeric keypad 1135 * 1136 * @since 9 1137 */ 1138 static const int32_t KEYCODE_NUMPAD_LEFT_PAREN; 1139 1140 /** 1141 * Right parentheses ()) key on the numeric keypad 1142 * 1143 * @since 9 1144 */ 1145 static const int32_t KEYCODE_NUMPAD_RIGHT_PAREN; 1146 1147 /** 1148 * Virtual multitask key 1149 * 1150 * @since 9 1151 */ 1152 static const int32_t KEYCODE_VIRTUAL_MULTITASK; 1153 1154 /** 1155 * Button A on the gamepad 1156 * 1157 * @since 9 1158 */ 1159 static const int32_t KEYCODE_BUTTON_A; 1160 1161 /** 1162 * Button B on the gamepad 1163 * 1164 * @since 9 1165 */ 1166 static const int32_t KEYCODE_BUTTON_B; 1167 1168 /** 1169 * Button C on the gamepad 1170 * 1171 * @since 9 1172 */ 1173 static const int32_t KEYCODE_BUTTON_C; 1174 1175 /** 1176 * Button X on the gamepad 1177 * 1178 * @since 9 1179 */ 1180 static const int32_t KEYCODE_BUTTON_X; 1181 1182 /** 1183 * Button Y on the gamepad 1184 * 1185 * @since 9 1186 */ 1187 static const int32_t KEYCODE_BUTTON_Y; 1188 1189 /** 1190 * Button Z on the gamepad 1191 * 1192 * @since 9 1193 */ 1194 static const int32_t KEYCODE_BUTTON_Z; 1195 1196 /** 1197 * Button L1 on the gamepad 1198 * 1199 * @since 9 1200 */ 1201 static const int32_t KEYCODE_BUTTON_L1; 1202 1203 /** 1204 * Button R1 on the gamepad 1205 * 1206 * @since 9 1207 */ 1208 static const int32_t KEYCODE_BUTTON_R1; 1209 1210 /** 1211 * Button L2 on the gamepad 1212 * 1213 * @since 9 1214 */ 1215 static const int32_t KEYCODE_BUTTON_L2; 1216 1217 /** 1218 * Button R2 on the gamepad 1219 * 1220 * @since 9 1221 */ 1222 static const int32_t KEYCODE_BUTTON_R2; 1223 1224 /** 1225 * Select button on the gamepad 1226 * 1227 * @since 9 1228 */ 1229 static const int32_t KEYCODE_BUTTON_SELECT; 1230 1231 /** 1232 * Start button on the gamepad 1233 * 1234 * @since 9 1235 */ 1236 static const int32_t KEYCODE_BUTTON_START; 1237 1238 /** 1239 * Mode button on the gamepad 1240 * 1241 * @since 9 1242 */ 1243 static const int32_t KEYCODE_BUTTON_MODE; 1244 1245 /** 1246 * Left Thumb button on the gamepad 1247 * 1248 * @since 9 1249 */ 1250 static const int32_t KEYCODE_BUTTON_THUMBL; 1251 1252 /** 1253 * Right Thumb button on the gamepad 1254 * 1255 * @since 9 1256 */ 1257 static const int32_t KEYCODE_BUTTON_THUMBR; 1258 1259 /** 1260 * Trigger button on the joystick 1261 * 1262 * @since 9 1263 */ 1264 static const int32_t KEYCODE_BUTTON_TRIGGER; 1265 1266 /** 1267 * Thumb button on the joystick 1268 * 1269 * @since 9 1270 */ 1271 static const int32_t KEYCODE_BUTTON_THUMB; 1272 1273 /** 1274 * Thumb button 2 on the joystick 1275 * 1276 * @since 9 1277 */ 1278 static const int32_t KEYCODE_BUTTON_THUMB2; 1279 1280 /** 1281 * Top button on the joystick 1282 * 1283 * @since 9 1284 */ 1285 static const int32_t KEYCODE_BUTTON_TOP; 1286 1287 /** 1288 * Top button 2 on the joystick 1289 * 1290 * @since 9 1291 */ 1292 static const int32_t KEYCODE_BUTTON_TOP2; 1293 1294 /** 1295 * Pinkie button on the joystick 1296 * 1297 * @since 9 1298 */ 1299 static const int32_t KEYCODE_BUTTON_PINKIE; 1300 1301 /** 1302 * Base button 1 on the joystick 1303 * 1304 * @since 9 1305 */ 1306 static const int32_t KEYCODE_BUTTON_BASE1; 1307 1308 /** 1309 * Base button 2 on the joystick 1310 * 1311 * @since 9 1312 */ 1313 static const int32_t KEYCODE_BUTTON_BASE2; 1314 1315 /** 1316 * Base button 3 on the joystick 1317 * 1318 * @since 9 1319 */ 1320 static const int32_t KEYCODE_BUTTON_BASE3; 1321 1322 /** 1323 * Base button 4 on the joystick 1324 * 1325 * @since 9 1326 */ 1327 static const int32_t KEYCODE_BUTTON_BASE4; 1328 1329 /** 1330 * Base button 5 on the joystick 1331 * 1332 * @since 9 1333 */ 1334 static const int32_t KEYCODE_BUTTON_BASE5; 1335 1336 /** 1337 * Base button 6 on the joystick 1338 * 1339 * @since 9 1340 */ 1341 static const int32_t KEYCODE_BUTTON_BASE6; 1342 1343 /** 1344 * Base button 7 on the joystick 1345 * 1346 * @since 9 1347 */ 1348 static const int32_t KEYCODE_BUTTON_BASE7; 1349 1350 /** 1351 * Base button 8 on the joystick 1352 * 1353 * @since 9 1354 */ 1355 static const int32_t KEYCODE_BUTTON_BASE8; 1356 1357 /** 1358 * Base button 9 on the joystick 1359 * 1360 * @since 9 1361 */ 1362 static const int32_t KEYCODE_BUTTON_BASE9; 1363 1364 /** 1365 * Dead button on the joystick 1366 * 1367 * @since 9 1368 */ 1369 static const int32_t KEYCODE_BUTTON_DEAD; 1370 1371 /** 1372 * Sleep key 1373 * 1374 * @since 9 1375 */ 1376 static const int32_t KEYCODE_SLEEP; 1377 1378 /** 1379 * Zenkaku_Hankaku, a Japanese modifier key that toggles between 1380 * Hankaku (half-width) and Zenkaku (full-width) characters 1381 * 1382 * @since 9 1383 */ 1384 static const int32_t KEYCODE_ZENKAKU_HANKAKU; 1385 1386 /** 1387 * 102nd key 1388 * 1389 * @since 9 1390 */ 1391 static const int32_t KEYCODE_102ND; 1392 1393 /** 1394 * Japanese Ro key 1395 * 1396 * @since 9 1397 */ 1398 static const int32_t KEYCODE_RO; 1399 1400 /** 1401 * Japanese katakana key 1402 * 1403 * @since 9 1404 */ 1405 static const int32_t KEYCODE_KATAKANA; 1406 1407 /** 1408 * Japanese hiragana key 1409 * 1410 * @since 9 1411 */ 1412 static const int32_t KEYCODE_HIRAGANA; 1413 1414 /** 1415 * Japanese conversion key 1416 * 1417 * @since 9 1418 */ 1419 static const int32_t KEYCODE_HENKAN; 1420 1421 /** 1422 * Japanese katakana/hiragana key 1423 * 1424 * @since 9 1425 */ 1426 static const int32_t KEYCODE_KATAKANA_HIRAGANA; 1427 1428 /** 1429 * Japanese non-conversion key 1430 * 1431 * @since 9 1432 */ 1433 static const int32_t KEYCODE_MUHENKAN; 1434 1435 /** 1436 * Line Feed key 1437 * 1438 * @since 9 1439 */ 1440 static const int32_t KEYCODE_LINEFEED; 1441 1442 /** 1443 * Macro key 1444 * 1445 * @since 9 1446 */ 1447 static const int32_t KEYCODE_MACRO; 1448 1449 /** 1450 * Plus/Minus key on the numeric keypad 1451 * 1452 * @since 9 1453 */ 1454 static const int32_t KEYCODE_NUMPAD_PLUSMINUS; 1455 1456 /** 1457 * Extension 1458 * 1459 * @since 9 1460 */ 1461 static const int32_t KEYCODE_SCALE; 1462 1463 /** 1464 * Japanese Hanguel key 1465 * 1466 * @since 9 1467 */ 1468 static const int32_t KEYCODE_HANGUEL; 1469 1470 /** 1471 * Japanese hanja key 1472 * 1473 * @since 9 1474 */ 1475 static const int32_t KEYCODE_HANJA; 1476 1477 /** 1478 * Japanese YEN key 1479 * 1480 * @since 9 1481 */ 1482 static const int32_t KEYCODE_YEN; 1483 1484 /** 1485 * Stop key 1486 * 1487 * @since 9 1488 */ 1489 static const int32_t KEYCODE_STOP; 1490 1491 /** 1492 * Again key 1493 * 1494 * @since 9 1495 */ 1496 static const int32_t KEYCODE_AGAIN; 1497 1498 /** 1499 * Props key 1500 * 1501 * @since 9 1502 */ 1503 static const int32_t KEYCODE_PROPS; 1504 1505 /** 1506 * Undo key 1507 * 1508 * @since 9 1509 */ 1510 static const int32_t KEYCODE_UNDO; 1511 1512 /** 1513 * Copy key 1514 * 1515 * @since 9 1516 */ 1517 static const int32_t KEYCODE_COPY; 1518 1519 /** 1520 * Open key 1521 * 1522 * @since 9 1523 */ 1524 static const int32_t KEYCODE_OPEN; 1525 1526 /** 1527 * Paste key 1528 * 1529 * @since 9 1530 */ 1531 static const int32_t KEYCODE_PASTE; 1532 1533 /** 1534 * Find key 1535 * 1536 * @since 9 1537 */ 1538 static const int32_t KEYCODE_FIND; 1539 1540 /** 1541 * Cut key 1542 * 1543 * @since 9 1544 */ 1545 static const int32_t KEYCODE_CUT; 1546 1547 /** 1548 * Help key 1549 * 1550 * @since 9 1551 */ 1552 static const int32_t KEYCODE_HELP; 1553 1554 /** 1555 * Calculate key 1556 * 1557 * @since 9 1558 */ 1559 static const int32_t KEYCODE_CALC; 1560 1561 /** 1562 * File key 1563 * 1564 * @since 9 1565 */ 1566 static const int32_t KEYCODE_FILE; 1567 1568 /** 1569 * Bookmarks key 1570 * 1571 * @since 9 1572 */ 1573 static const int32_t KEYCODE_BOOKMARKS; 1574 1575 /** 1576 * Next key 1577 * 1578 * @since 9 1579 */ 1580 static const int32_t KEYCODE_NEXT; 1581 1582 /** 1583 * Play/Pause key 1584 * 1585 * @since 9 1586 */ 1587 static const int32_t KEYCODE_PLAYPAUSE; 1588 1589 /** 1590 * Previous key 1591 * 1592 * @since 9 1593 */ 1594 static const int32_t KEYCODE_PREVIOUS; 1595 1596 /** 1597 * CD Stop key 1598 * 1599 * @since 9 1600 */ 1601 static const int32_t KEYCODE_STOPCD; 1602 1603 /** 1604 * Configuration key 1605 * 1606 * @since 9 1607 */ 1608 static const int32_t KEYCODE_CONFIG; 1609 1610 /** 1611 * Refresh key 1612 * 1613 * @since 9 1614 */ 1615 static const int32_t KEYCODE_REFRESH; 1616 1617 /** 1618 * Exit key 1619 * 1620 * @since 9 1621 */ 1622 static const int32_t KEYCODE_EXIT; 1623 1624 /** 1625 * Edit key 1626 * 1627 * @since 9 1628 */ 1629 static const int32_t KEYCODE_EDIT; 1630 1631 /** 1632 * Scroll Up key 1633 * 1634 * @since 9 1635 */ 1636 static const int32_t KEYCODE_SCROLLUP; 1637 1638 /** 1639 * Scroll Down key 1640 * 1641 * @since 9 1642 */ 1643 static const int32_t KEYCODE_SCROLLDOWN; 1644 1645 /** 1646 * New key 1647 * 1648 * @since 9 1649 */ 1650 static const int32_t KEYCODE_NEW; 1651 1652 /** 1653 * Redo key 1654 * 1655 * @since 9 1656 */ 1657 static const int32_t KEYCODE_REDO; 1658 1659 /** 1660 * Close key 1661 * 1662 * @since 9 1663 */ 1664 static const int32_t KEYCODE_CLOSE; 1665 1666 /** 1667 * Play key 1668 * 1669 * @since 9 1670 */ 1671 static const int32_t KEYCODE_PLAY; 1672 1673 /** 1674 * Bass boost key 1675 * 1676 * @since 9 1677 */ 1678 static const int32_t KEYCODE_BASSBOOST; 1679 1680 /** 1681 * Print key 1682 * 1683 * @since 9 1684 */ 1685 static const int32_t KEYCODE_PRINT; 1686 1687 /** 1688 * Chat key 1689 * 1690 * @since 9 1691 */ 1692 static const int32_t KEYCODE_CHAT; 1693 1694 /** 1695 * Finance key 1696 * 1697 * @since 9 1698 */ 1699 static const int32_t KEYCODE_FINANCE; 1700 1701 /** 1702 * Cancel key 1703 * 1704 * @since 9 1705 */ 1706 static const int32_t KEYCODE_CANCEL; 1707 1708 /** 1709 * Keyboard Illumination Toggle key 1710 * 1711 * @since 9 1712 */ 1713 static const int32_t KEYCODE_KBDILLUM_TOGGLE; 1714 1715 /** 1716 * Keyboard Illumination Down key 1717 * 1718 * @since 9 1719 */ 1720 static const int32_t KEYCODE_KBDILLUM_DOWN; 1721 1722 /** 1723 * Keyboard Illumination Up key 1724 * 1725 * @since 9 1726 */ 1727 static const int32_t KEYCODE_KBDILLUM_UP; 1728 1729 /** 1730 * Send key 1731 * 1732 * @since 9 1733 */ 1734 static const int32_t KEYCODE_SEND; 1735 1736 /** 1737 * Reply key 1738 * 1739 * @since 9 1740 */ 1741 static const int32_t KEYCODE_REPLY; 1742 1743 /** 1744 * Mail Forward key 1745 * 1746 * @since 9 1747 */ 1748 static const int32_t KEYCODE_FORWARDMAIL; 1749 1750 /** 1751 * Save key 1752 * 1753 * @since 9 1754 */ 1755 static const int32_t KEYCODE_SAVE; 1756 1757 /** 1758 * Documents key 1759 * 1760 * @since 9 1761 */ 1762 static const int32_t KEYCODE_DOCUMENTS; 1763 1764 /** 1765 * Next Video key 1766 * 1767 * @since 9 1768 */ 1769 static const int32_t KEYCODE_VIDEO_NEXT; 1770 1771 /** 1772 * Previous Video key 1773 * 1774 * @since 9 1775 */ 1776 static const int32_t KEYCODE_VIDEO_PREV; 1777 1778 /** 1779 * Brightness Cycle key 1780 * 1781 * @since 9 1782 */ 1783 static const int32_t KEYCODE_BRIGHTNESS_CYCLE; 1784 1785 /** 1786 * Brightness 0 key 1787 * 1788 * @since 9 1789 */ 1790 static const int32_t KEYCODE_BRIGHTNESS_ZERO; 1791 1792 /** 1793 * Display Off key 1794 * 1795 * @since 9 1796 */ 1797 static const int32_t KEYCODE_DISPLAY_OFF; 1798 1799 /** 1800 * Miscellaneous buttons on the gamepad 1801 * 1802 * @since 9 1803 */ 1804 static const int32_t KEYCODE_BTN_MISC; 1805 1806 /** 1807 * Go To key 1808 * 1809 * @since 9 1810 */ 1811 static const int32_t KEYCODE_GOTO; 1812 1813 /** 1814 * Info key 1815 * 1816 * @since 9 1817 */ 1818 static const int32_t KEYCODE_INFO; 1819 1820 /** 1821 * Program key 1822 * 1823 * @since 9 1824 */ 1825 static const int32_t KEYCODE_PROGRAM; 1826 1827 /** 1828 * Personal Video Recorder (PVR) key 1829 * 1830 * @since 9 1831 */ 1832 static const int32_t KEYCODE_PVR; 1833 1834 /** 1835 * Subtitle key 1836 * 1837 * @since 9 1838 */ 1839 static const int32_t KEYCODE_SUBTITLE; 1840 1841 /** 1842 * Full Screen key 1843 * 1844 * @since 9 1845 */ 1846 static const int32_t KEYCODE_FULL_SCREEN; 1847 1848 /** 1849 * Keyboard 1850 * 1851 * @since 9 1852 */ 1853 static const int32_t KEYCODE_KEYBOARD; 1854 1855 /** 1856 * Aspect Ratio key 1857 * 1858 * @since 9 1859 */ 1860 static const int32_t KEYCODE_ASPECT_RATIO; 1861 1862 /** 1863 * Port Control key 1864 * 1865 * @since 9 1866 */ 1867 static const int32_t KEYCODE_PC; 1868 1869 /** 1870 * TV key 1871 * 1872 * @since 9 1873 */ 1874 static const int32_t KEYCODE_TV; 1875 1876 /** 1877 * TV key 2 1878 * 1879 * @since 9 1880 */ 1881 static const int32_t KEYCODE_TV2; 1882 1883 /** 1884 * VCR key 1885 * 1886 * @since 9 1887 */ 1888 static const int32_t KEYCODE_VCR; 1889 1890 /** 1891 * VCR key 2 1892 * 1893 * @since 9 1894 */ 1895 static const int32_t KEYCODE_VCR2; 1896 1897 /** 1898 * SIM Application Toolkit (SAT) key 1899 * 1900 * @since 9 1901 */ 1902 static const int32_t KEYCODE_SAT; 1903 1904 /** 1905 * CD key 1906 * 1907 * @since 9 1908 */ 1909 static const int32_t KEYCODE_CD; 1910 1911 /** 1912 * Tape key 1913 * 1914 * @since 9 1915 */ 1916 static const int32_t KEYCODE_TAPE; 1917 1918 /** 1919 * Tuner key 1920 * 1921 * @since 9 1922 */ 1923 static const int32_t KEYCODE_TUNER; 1924 1925 /** 1926 * Player key 1927 * 1928 * @since 9 1929 */ 1930 static const int32_t KEYCODE_PLAYER; 1931 1932 /** 1933 * DVD key 1934 * 1935 * @since 9 1936 */ 1937 static const int32_t KEYCODE_DVD; 1938 1939 /** 1940 * Audio key 1941 * 1942 * @since 9 1943 */ 1944 static const int32_t KEYCODE_AUDIO; 1945 1946 /** 1947 * Video key 1948 * 1949 * @since 9 1950 */ 1951 static const int32_t KEYCODE_VIDEO; 1952 1953 /** 1954 * Memo key 1955 * 1956 * @since 9 1957 */ 1958 static const int32_t KEYCODE_MEMO; 1959 1960 /** 1961 * Calendar key 1962 * 1963 * @since 9 1964 */ 1965 static const int32_t KEYCODE_CALENDAR; 1966 1967 /** 1968 * Red indicator 1969 * 1970 * @since 9 1971 */ 1972 static const int32_t KEYCODE_RED; 1973 1974 /** 1975 * Green indicator 1976 * 1977 * @since 9 1978 */ 1979 static const int32_t KEYCODE_GREEN; 1980 1981 /** 1982 * Yellow indicator 1983 * 1984 * @since 9 1985 */ 1986 static const int32_t KEYCODE_YELLOW; 1987 1988 /** 1989 * Blue indicator 1990 * 1991 * @since 9 1992 */ 1993 static const int32_t KEYCODE_BLUE; 1994 1995 /** 1996 * Channel Up key 1997 * 1998 * @since 9 1999 */ 2000 static const int32_t KEYCODE_CHANNELUP; 2001 2002 /** 2003 * Channel Down key 2004 * 2005 * @since 9 2006 */ 2007 static const int32_t KEYCODE_CHANNELDOWN; 2008 2009 /** 2010 * Last key 2011 * 2012 * @since 9 2013 */ 2014 static const int32_t KEYCODE_LAST; 2015 2016 /** 2017 * Restart key 2018 * 2019 * @since 9 2020 */ 2021 static const int32_t KEYCODE_RESTART; 2022 2023 /** 2024 * Slow key 2025 * 2026 * @since 9 2027 */ 2028 static const int32_t KEYCODE_SLOW; 2029 2030 /** 2031 * Shuffle key 2032 * 2033 * @since 9 2034 */ 2035 static const int32_t KEYCODE_SHUFFLE; 2036 2037 /** 2038 * Videophone key 2039 * 2040 * @since 9 2041 */ 2042 static const int32_t KEYCODE_VIDEOPHONE; 2043 2044 /** 2045 * Games key 2046 * 2047 * @since 9 2048 */ 2049 static const int32_t KEYCODE_GAMES; 2050 2051 /** 2052 * Zoom In key 2053 * 2054 * @since 9 2055 */ 2056 static const int32_t KEYCODE_ZOOMIN; 2057 2058 /** 2059 * Zoom Out key 2060 * 2061 * @since 9 2062 */ 2063 static const int32_t KEYCODE_ZOOMOUT; 2064 2065 /** 2066 * Zoom Reset key 2067 * 2068 * @since 9 2069 */ 2070 static const int32_t KEYCODE_ZOOMRESET; 2071 2072 /** 2073 * Word Processor key 2074 * 2075 * @since 9 2076 */ 2077 static const int32_t KEYCODE_WORDPROCESSOR; 2078 2079 /** 2080 * Editor key 2081 * 2082 * @since 9 2083 */ 2084 static const int32_t KEYCODE_EDITOR; 2085 2086 /** 2087 * Spreadsheet key 2088 * 2089 * @since 9 2090 */ 2091 static const int32_t KEYCODE_SPREADSHEET; 2092 2093 /** 2094 * Graphics Editor key 2095 * 2096 * @since 9 2097 */ 2098 static const int32_t KEYCODE_GRAPHICSEDITOR; 2099 2100 /** 2101 * Presentation key 2102 * 2103 * @since 9 2104 */ 2105 static const int32_t KEYCODE_PRESENTATION; 2106 2107 /** 2108 * Database key 2109 * 2110 * @since 9 2111 */ 2112 static const int32_t KEYCODE_DATABASE; 2113 2114 /** 2115 * News key 2116 * 2117 * @since 9 2118 */ 2119 static const int32_t KEYCODE_NEWS; 2120 2121 /** 2122 * Voice mailbox 2123 * 2124 * @since 9 2125 */ 2126 static const int32_t KEYCODE_VOICEMAIL; 2127 2128 /** 2129 * Address Book key 2130 * 2131 * @since 9 2132 */ 2133 static const int32_t KEYCODE_ADDRESSBOOK; 2134 2135 /** 2136 * Messenger key 2137 * 2138 * @since 9 2139 */ 2140 static const int32_t KEYCODE_MESSENGER; 2141 2142 /** 2143 * Brightness Toggle key 2144 * 2145 * @since 9 2146 */ 2147 static const int32_t KEYCODE_BRIGHTNESS_TOGGLE; 2148 2149 /** 2150 * Spell Check key 2151 * 2152 * @since 9 2153 */ 2154 static const int32_t KEYCODE_SPELLCHECK; 2155 2156 /** 2157 * Coffee key 2158 * 2159 * @since 9 2160 */ 2161 static const int32_t KEYCODE_COFFEE; 2162 2163 /** 2164 * Media Repeat key 2165 * 2166 * @since 9 2167 */ 2168 static const int32_t KEYCODE_MEDIA_REPEAT; 2169 2170 /** 2171 * Images key 2172 * 2173 * @since 9 2174 */ 2175 static const int32_t KEYCODE_IMAGES; 2176 2177 /** 2178 * Button Configuration key 2179 * 2180 * @since 9 2181 */ 2182 static const int32_t KEYCODE_BUTTONCONFIG; 2183 2184 /** 2185 * Task Manager key 2186 * 2187 * @since 9 2188 */ 2189 static const int32_t KEYCODE_TASKMANAGER; 2190 2191 /** 2192 * Journal key 2193 * 2194 * @since 9 2195 */ 2196 static const int32_t KEYCODE_JOURNAL; 2197 2198 /** 2199 * Control Panel key 2200 * 2201 * @since 9 2202 */ 2203 static const int32_t KEYCODE_CONTROLPANEL; 2204 2205 /** 2206 * Application Select key 2207 * 2208 * @since 9 2209 */ 2210 static const int32_t KEYCODE_APPSELECT; 2211 2212 /** 2213 * Screen Saver key 2214 * 2215 * @since 9 2216 */ 2217 static const int32_t KEYCODE_SCREENSAVER; 2218 2219 /** 2220 * Assistant key 2221 * 2222 * @since 9 2223 */ 2224 static const int32_t KEYCODE_ASSISTANT; 2225 2226 /** 2227 * Next Keyboard Layout key 2228 * 2229 * @since 9 2230 */ 2231 static const int32_t KEYCODE_KBD_LAYOUT_NEXT; 2232 2233 /** 2234 * Minimum Brightness key 2235 * 2236 * @since 9 2237 */ 2238 static const int32_t KEYCODE_BRIGHTNESS_MIN; 2239 2240 /** 2241 * Maximum Brightness key 2242 * 2243 * @since 9 2244 */ 2245 static const int32_t KEYCODE_BRIGHTNESS_MAX; 2246 2247 /** 2248 * Keyboard Input Assist_Previous 2249 * 2250 * @since 9 2251 */ 2252 static const int32_t KEYCODE_KBDINPUTASSIST_PREV; 2253 2254 /** 2255 * Keyboard Input Assist_Next 2256 * 2257 * @since 9 2258 */ 2259 static const int32_t KEYCODE_KBDINPUTASSIST_NEXT; 2260 2261 /** 2262 * Keyboard Input Assist_Previous Group 2263 * 2264 * @since 9 2265 */ 2266 static const int32_t KEYCODE_KBDINPUTASSIST_PREVGROUP; 2267 2268 /** 2269 * Keyboard Input Assist_Next Group 2270 * 2271 * @since 9 2272 */ 2273 static const int32_t KEYCODE_KBDINPUTASSIST_NEXTGROUP; 2274 2275 /** 2276 * Keyboard Input Assist_Accept 2277 * 2278 * @since 9 2279 */ 2280 static const int32_t KEYCODE_KBDINPUTASSIST_ACCEPT; 2281 2282 /** 2283 * Keyboard Input Assist_Cancel 2284 * 2285 * @since 9 2286 */ 2287 static const int32_t KEYCODE_KBDINPUTASSIST_CANCEL; 2288 2289 /** 2290 * Front key 2291 * 2292 * @since 9 2293 */ 2294 static const int32_t KEYCODE_FRONT; 2295 2296 /** 2297 * Setup key 2298 * 2299 * @since 9 2300 */ 2301 static const int32_t KEYCODE_SETUP; 2302 2303 /** 2304 * Wakeup key 2305 * 2306 * @since 9 2307 */ 2308 static const int32_t KEYCODE_WAKEUP; 2309 2310 /** 2311 * Send File key 2312 * 2313 * @since 9 2314 */ 2315 static const int32_t KEYCODE_SENDFILE; 2316 2317 /** 2318 * Delete File key 2319 * 2320 * @since 9 2321 */ 2322 static const int32_t KEYCODE_DELETEFILE; 2323 2324 /** 2325 * File Transfer (XFER) key 2326 * 2327 * @since 9 2328 */ 2329 static const int32_t KEYCODE_XFER; 2330 2331 /** 2332 * Program key 1 2333 * 2334 * @since 9 2335 */ 2336 static const int32_t KEYCODE_PROG1; 2337 2338 /** 2339 * Program key 2 2340 * 2341 * @since 9 2342 */ 2343 static const int32_t KEYCODE_PROG2; 2344 2345 /** 2346 * MS-DOS key 2347 * 2348 * @since 9 2349 */ 2350 static const int32_t KEYCODE_MSDOS; 2351 2352 /** 2353 * Screen Lock key 2354 * 2355 * @since 9 2356 */ 2357 static const int32_t KEYCODE_SCREENLOCK; 2358 2359 /** 2360 * Direction Rotation Display key 2361 * 2362 * @since 9 2363 */ 2364 static const int32_t KEYCODE_DIRECTION_ROTATE_DISPLAY; 2365 2366 /** 2367 * Cycle Windows key 2368 * 2369 * @since 9 2370 */ 2371 static const int32_t KEYCODE_CYCLEWINDOWS; 2372 2373 /** 2374 * Computer key 2375 * 2376 * @since 9 2377 */ 2378 static const int32_t KEYCODE_COMPUTER; 2379 2380 /** 2381 * Eject Close CD key 2382 * 2383 * @since 9 2384 */ 2385 static const int32_t KEYCODE_EJECTCLOSECD; 2386 2387 /** 2388 * ISO key 2389 * 2390 * @since 9 2391 */ 2392 static const int32_t KEYCODE_ISO; 2393 2394 /** 2395 * Move key 2396 * 2397 * @since 9 2398 */ 2399 static const int32_t KEYCODE_MOVE; 2400 2401 /** 2402 * F13 key 2403 * 2404 * @since 9 2405 */ 2406 static const int32_t KEYCODE_F13; 2407 2408 /** 2409 * F14 key 2410 * 2411 * @since 9 2412 */ 2413 static const int32_t KEYCODE_F14; 2414 2415 /** 2416 * F15 key 2417 * 2418 * @since 9 2419 */ 2420 static const int32_t KEYCODE_F15; 2421 2422 /** 2423 * F16 key 2424 * 2425 * @since 9 2426 */ 2427 static const int32_t KEYCODE_F16; 2428 2429 /** 2430 * F17 key 2431 * 2432 * @since 9 2433 */ 2434 static const int32_t KEYCODE_F17; 2435 2436 /** 2437 * F18 key 2438 * 2439 * @since 9 2440 */ 2441 static const int32_t KEYCODE_F18; 2442 2443 /** 2444 * F19 key 2445 * 2446 * @since 9 2447 */ 2448 static const int32_t KEYCODE_F19; 2449 2450 /** 2451 * F20 key 2452 * 2453 * @since 9 2454 */ 2455 static const int32_t KEYCODE_F20; 2456 2457 /** 2458 * F21 key 2459 * 2460 * @since 9 2461 */ 2462 static const int32_t KEYCODE_F21; 2463 2464 /** 2465 * F22 key 2466 * 2467 * @since 9 2468 */ 2469 static const int32_t KEYCODE_F22; 2470 2471 /** 2472 * F23 key 2473 * 2474 * @since 9 2475 */ 2476 static const int32_t KEYCODE_F23; 2477 2478 /** 2479 * F24 key 2480 * 2481 * @since 9 2482 */ 2483 static const int32_t KEYCODE_F24; 2484 2485 /** 2486 * Program key 3 2487 * 2488 * @since 9 2489 */ 2490 static const int32_t KEYCODE_PROG3; 2491 2492 /** 2493 * Program key 4 2494 * 2495 * @since 9 2496 */ 2497 static const int32_t KEYCODE_PROG4; 2498 2499 /** 2500 * Dashboard key 2501 * 2502 * @since 9 2503 */ 2504 static const int32_t KEYCODE_DASHBOARD; 2505 2506 /** 2507 * Suspend key 2508 * 2509 * @since 9 2510 */ 2511 static const int32_t KEYCODE_SUSPEND; 2512 2513 /** 2514 * Higher Order Path key 2515 * 2516 * @since 9 2517 */ 2518 static const int32_t KEYCODE_HP; 2519 2520 /** 2521 * Sound key 2522 * 2523 * @since 9 2524 */ 2525 static const int32_t KEYCODE_SOUND; 2526 2527 /** 2528 * Question key 2529 * 2530 * @since 9 2531 */ 2532 static const int32_t KEYCODE_QUESTION; 2533 2534 /** 2535 * Connect key 2536 * 2537 * @since 9 2538 */ 2539 static const int32_t KEYCODE_CONNECT; 2540 2541 /** 2542 * Sport key 2543 * 2544 * @since 9 2545 */ 2546 static const int32_t KEYCODE_SPORT; 2547 2548 /** 2549 * Shop key 2550 * 2551 * @since 9 2552 */ 2553 static const int32_t KEYCODE_SHOP; 2554 2555 /** 2556 * Alterase key 2557 * 2558 * @since 9 2559 */ 2560 static const int32_t KEYCODE_ALTERASE; 2561 2562 /** 2563 * Enable/Disable Video Mode key 2564 * 2565 * @since 9 2566 */ 2567 static const int32_t KEYCODE_SWITCHVIDEOMODE; 2568 2569 /** 2570 * Battery key 2571 * 2572 * @since 9 2573 */ 2574 static const int32_t KEYCODE_BATTERY; 2575 2576 /** 2577 * Bluetooth key 2578 * 2579 * @since 9 2580 */ 2581 static const int32_t KEYCODE_BLUETOOTH; 2582 2583 /** 2584 * WLAN key 2585 * 2586 * @since 9 2587 */ 2588 static const int32_t KEYCODE_WLAN; 2589 2590 /** 2591 * Ultra-wideband (UWB) key 2592 * 2593 * @since 9 2594 */ 2595 static const int32_t KEYCODE_UWB; 2596 2597 /** 2598 * WWAN WiMAX key 2599 * 2600 * @since 9 2601 */ 2602 static const int32_t KEYCODE_WWAN_WIMAX; 2603 2604 /** 2605 * RF Kill key 2606 * 2607 * @since 9 2608 */ 2609 static const int32_t KEYCODE_RFKILL; 2610 2611 /** 2612 * Channel key 2613 * 2614 * @since 9 2615 */ 2616 static const int32_t KEYCODE_CHANNEL; 2617 2618 /** 2619 * Button 0 2620 * 2621 * @since 9 2622 */ 2623 static const int32_t KEYCODE_BTN_0; 2624 2625 /** 2626 * Button 1 2627 * 2628 * @since 9 2629 */ 2630 static const int32_t KEYCODE_BTN_1; 2631 2632 /** 2633 * Button 2 2634 * 2635 * @since 9 2636 */ 2637 static const int32_t KEYCODE_BTN_2; 2638 2639 /** 2640 * Button 3 2641 * 2642 * @since 9 2643 */ 2644 static const int32_t KEYCODE_BTN_3; 2645 2646 /** 2647 * Button 4 2648 * 2649 * @since 9 2650 */ 2651 static const int32_t KEYCODE_BTN_4; 2652 2653 /** 2654 * Button 5 2655 * 2656 * @since 9 2657 */ 2658 static const int32_t KEYCODE_BTN_5; 2659 2660 /** 2661 * Button 6 2662 * 2663 * @since 9 2664 */ 2665 static const int32_t KEYCODE_BTN_6; 2666 2667 /** 2668 * Button 7 2669 * 2670 * @since 9 2671 */ 2672 static const int32_t KEYCODE_BTN_7; 2673 2674 /** 2675 * Button 8 2676 * 2677 * @since 9 2678 */ 2679 static const int32_t KEYCODE_BTN_8; 2680 2681 /** 2682 * Button 9 2683 * 2684 * @since 9 2685 */ 2686 static const int32_t KEYCODE_BTN_9; 2687 2688 /** 2689 * Virtual keyboard 1 2690 * 2691 * @since 9 2692 */ 2693 static const int32_t KEYCODE_BRL_DOT1; 2694 2695 /** 2696 * Virtual keyboard 2 2697 * 2698 * @since 9 2699 */ 2700 static const int32_t KEYCODE_BRL_DOT2; 2701 2702 /** 2703 * Virtual keyboard 3 2704 * 2705 * @since 9 2706 */ 2707 static const int32_t KEYCODE_BRL_DOT3; 2708 2709 /** 2710 * Virtual keyboard 4 2711 * 2712 * @since 9 2713 */ 2714 static const int32_t KEYCODE_BRL_DOT4; 2715 2716 /** 2717 * Virtual keyboard 5 2718 * 2719 * @since 9 2720 */ 2721 static const int32_t KEYCODE_BRL_DOT5; 2722 2723 /** 2724 * Virtual keyboard 6 2725 * 2726 * @since 9 2727 */ 2728 static const int32_t KEYCODE_BRL_DOT6; 2729 2730 /** 2731 * Virtual keyboard 7 2732 * 2733 * @since 9 2734 */ 2735 static const int32_t KEYCODE_BRL_DOT7; 2736 2737 /** 2738 * Virtual keyboard 8 2739 * 2740 * @since 9 2741 */ 2742 static const int32_t KEYCODE_BRL_DOT8; 2743 2744 /** 2745 * Virtual keyboard 9 2746 * 2747 * @since 9 2748 */ 2749 static const int32_t KEYCODE_BRL_DOT9; 2750 2751 /** 2752 * Virtual keyboard 10 2753 * 2754 * @since 9 2755 */ 2756 static const int32_t KEYCODE_BRL_DOT10; 2757 2758 /** 2759 * Left Knob roll-up 2760 * <p>In contrast to {@link #static const int32_t KEYCODE_LEFT_KNOB_ROLL_DOWN}, 2761 * this key is used to roll the left knob upwards. The knob function is scenario-specific, 2762 * for example, increasing the volume or air conditioner temperature. 2763 * 2764 * @since 9 2765 */ 2766 static const int32_t KEYCODE_LEFT_KNOB_ROLL_UP; 2767 2768 /** 2769 * Left Knob roll-down 2770 * <p>In contrast to {@link #static const int32_t KEYCODE_LEFT_KNOB_ROLL_UP}, 2771 * this key is used to roll the left knob downwards. The knob function is 2772 * scenario-specific, for example, reducing the volume or air 2773 * conditioner temperature. 2774 * @since 9 2775 */ 2776 static const int32_t KEYCODE_LEFT_KNOB_ROLL_DOWN; 2777 2778 /** 2779 * Left Knob 2780 * <p>Pressing the knob will activate its adjustment function. 2781 * 2782 * @since 9 2783 */ 2784 static const int32_t KEYCODE_LEFT_KNOB; 2785 2786 /** 2787 * Right Knob roll-up 2788 * <p>In contrast to {@link #static const int32_t KEYCODE_RIGHT_KNOB_ROLL_DOWN}, 2789 * this key is used to roll the right knob upwards. The knobfunction is scenario-specific, 2790 * for example, increasing the volume or air conditioner temperature. 2791 * 2792 * @since 9 2793 */ 2794 static const int32_t KEYCODE_RIGHT_KNOB_ROLL_UP; 2795 2796 /** 2797 * Right Knob roll-down 2798 * <p>In contrast to {@link #static const int32_t KEYCODE_RIGHT_KNOB_ROLL_UP}, 2799 * this key is used to roll the right knob downwards. The knobfunction is scenario-specific, 2800 * for example, reducing the volume or air conditioner temperature. 2801 * 2802 * @since 9 2803 */ 2804 static const int32_t KEYCODE_RIGHT_KNOB_ROLL_DOWN; 2805 2806 /** 2807 * Right Knob 2808 * <p>Pressing the knob will activate its adjustment function. 2809 * 2810 * @since 9 2811 */ 2812 static const int32_t KEYCODE_RIGHT_KNOB; 2813 2814 /** 2815 * Audio Source Switch button 2816 * <p>Pressing this button will enable the audio source. Depending on the 2817 * actual scenario, it may also indicate that the Bluetooth call control 2818 * button is pressed. 2819 * @since 9 2820 */ 2821 static const int32_t KEYCODE_VOICE_SOURCE_SWITCH; 2822 2823 /** 2824 * Menu key 2825 * <p>Pressing this key will display the launcher page. 2826 * 2827 * @since 9 2828 */ 2829 static const int32_t KEYCODE_LAUNCHER_MENU; 2830 2831 /** 2832 * Unknown key operation, which is usually used to indicate the initial invalid value. 2833 * 2834 * @since 9 2835 */ 2836 static const int32_t KEY_ACTION_UNKNOWN; 2837 2838 /** 2839 * Action Cancel 2840 * Pressing this key will cause the failure in reporting the Action Up event. 2841 * Instead, the action of pressing the Action Cancel key is reported. 2842 * 2843 * @since 9 2844 */ 2845 static const int32_t KEY_ACTION_CANCEL; 2846 2847 /** 2848 * Action Down 2849 * 2850 * @since 9 2851 */ 2852 static const int32_t KEY_ACTION_DOWN; 2853 2854 /** 2855 * Action Up 2856 * 2857 * @since 9 2858 */ 2859 static const int32_t KEY_ACTION_UP; 2860 2861 public: 2862 class KeyItem { 2863 public: 2864 KeyItem(); 2865 ~KeyItem(); 2866 2867 /** 2868 * @brief Obtains the key code of the key. 2869 * @return Returns the key code. 2870 * @since 9 2871 */ 2872 int32_t GetKeyCode() const; 2873 2874 /** 2875 * @brief Sets a key code for the key. 2876 * @param keyCode Indicates the key code to set. 2877 * @return void 2878 * @since 9 2879 */ 2880 void SetKeyCode(int32_t keyCode); 2881 2882 /** 2883 * @brief Obtains the time when the key is pressed. 2884 * @return Returns the time. 2885 * @since 9 2886 */ 2887 int64_t GetDownTime() const; 2888 2889 /** 2890 * @brief Sets the time when the key is pressed. 2891 * @param downTime Indicates the time to set. 2892 * @return void 2893 * @since 9 2894 */ 2895 void SetDownTime(int64_t downTime); 2896 2897 /** 2898 * @brief Obtains the unique identifier of the device that reports this event. 2899 * @return Returns the device ID. 2900 * @since 9 2901 */ 2902 int32_t GetDeviceId() const; 2903 2904 /** 2905 * @brief Sets a unique identifier for the device that reports this event. 2906 * @param deviceId Indicates the device ID to set. 2907 * @return void 2908 * @since 9 2909 */ 2910 void SetDeviceId(int32_t deviceId); 2911 2912 /** 2913 * @brief Checks whether the key is pressed. 2914 * @return Returns <b>true</b> if the key is pressed; returns <b>false</b> otherwise. 2915 * @since 9 2916 */ 2917 bool IsPressed() const; 2918 2919 /** 2920 * @brief Sets whether to enable the pressed state for the key. 2921 * @param pressed Specifies whether to set the pressed state for the key. 2922 * The value <b>true</b> means to set the pressed state for the key, 2923 * and the <b>false</b> means the opposite. 2924 * @return void 2925 * @since 9 2926 */ 2927 void SetPressed(bool pressed); 2928 2929 /** 2930 * @brief 设置当前按键对应的unicode值 2931 * @param unicode 指定的unicode值 2932 * @return 空 2933 * @since 9 2934 */ 2935 void SetUnicode(uint32_t unicode); 2936 2937 /** 2938 * @brief 获取当前按键的unicode值 2939 * @return 返回unicode值 2940 * @since 9 2941 */ 2942 uint32_t GetUnicode() const; 2943 2944 public: 2945 /** 2946 * @brief Writes data to a <b>Parcel</b> object. 2947 * @param out Indicates the object into which data will be written. 2948 * @return Returns <b>true</b> if the data is successfully written; returns <b>false</b> otherwise. 2949 * @since 9 2950 */ 2951 bool WriteToParcel(Parcel &out) const; 2952 2953 /** 2954 * @brief Reads data from a <b>Parcel</b> object. 2955 * @param in Indicates the object from which data will be read. 2956 * @return Returns <b>true</b> if the data is successfully read; returns <b>false</b> otherwise. 2957 * @since 9 2958 */ 2959 bool ReadFromParcel(Parcel &in); 2960 2961 private: 2962 bool pressed_ = false; 2963 int32_t deviceId_ = -1; 2964 int32_t keyCode_ = -1; 2965 int64_t downTime_ = 0; 2966 uint32_t unicode_ { 0 }; 2967 }; 2968 2969 public: 2970 static std::shared_ptr<KeyEvent> from(std::shared_ptr<InputEvent> inputEvent); 2971 2972 /** 2973 * @brief Converts the action of this key event as a string. 2974 * @param action Indicates the action represented by pressing a key. 2975 * @return Returns the pointer to the action string. 2976 * @since 9 2977 */ 2978 static const char* ActionToString(int32_t action); 2979 2980 /** 2981 * @brief Converts the key code of this key event as a string. 2982 * @param keyCode Indicates the code that identifies the key. 2983 * @return Returns the pointer to the key code string. 2984 * @since 9 2985 */ 2986 static const char* KeyCodeToString(int32_t keyCode); 2987 2988 static std::shared_ptr<KeyEvent> Clone(std::shared_ptr<KeyEvent> keyEvent); 2989 2990 public: 2991 /** 2992 * @brief Constructor of KeyEvent. 2993 * @since 9 2994 */ 2995 KeyEvent(const KeyEvent& other); 2996 2997 /** 2998 * @brief Virtual destructor of KeyEvent. 2999 * @since 9 3000 */ 3001 virtual ~KeyEvent(); 3002 3003 KeyEvent& operator=(const KeyEvent& other) = delete; 3004 DISALLOW_MOVE(KeyEvent); 3005 3006 /** 3007 * @brief Creates a key event. 3008 * @since 9 3009 */ 3010 static std::shared_ptr<KeyEvent> Create(); 3011 3012 /** 3013 * @brief Obtains the key code of this key event. 3014 * @return Returns the key code. 3015 * @since 9 3016 */ 3017 int32_t GetKeyCode() const; 3018 3019 /** 3020 * @brief Sets a key code for this key event. 3021 * @param keyCode Indicates the key code to set. 3022 * @return void 3023 * @since 9 3024 */ 3025 void SetKeyCode(int32_t keyCode); 3026 3027 /** 3028 * @brief Obtains the key action of this key event. 3029 * @return Returns the key action. 3030 * @since 9 3031 */ 3032 int32_t GetKeyAction() const; 3033 3034 /** 3035 * @brief Sets a key action for this key event. 3036 * @param keyAction Indicates the key action to set. 3037 * @return void 3038 * @since 9 3039 */ 3040 void SetKeyAction(int32_t keyAction); 3041 3042 /** 3043 * @brief Obtains the list of pressed keys in this key event. 3044 * @return Returns the list of pressed keys. 3045 * @since 9 3046 */ 3047 std::vector<int32_t> GetPressedKeys() const; 3048 3049 /** 3050 * @brief Adds a key item. 3051 * @param keyItem Indicates the key item to add. 3052 * @return void 3053 * @since 9 3054 */ 3055 void AddKeyItem(const KeyItem& keyItem); 3056 3057 /** 3058 * @brief Obtains the key item. 3059 * @return Returns the key item. 3060 * @since 9 3061 */ 3062 std::vector<KeyEvent::KeyItem> GetKeyItems() const; 3063 3064 /** 3065 * @brief Adds the pressed key items. 3066 * @param keyItem Indicates the key item to add. 3067 * @return void 3068 * @since 9 3069 */ 3070 void AddPressedKeyItems(const KeyItem& keyItem); 3071 3072 /** 3073 * @brief Removes the released key Items. 3074 * @param keyItem Indicates the key item to remove. 3075 * @return void 3076 * @since 9 3077 */ 3078 void RemoveReleasedKeyItems(const KeyItem& keyItem); 3079 3080 /** 3081 * @brief Obtains the key item of this key event. 3082 * @return Returns the pointer to the key item. 3083 * @since 9 3084 */ 3085 const KeyItem* GetKeyItem() const; 3086 3087 /** 3088 * @brief Obtains the key item based on a key code. 3089 * @param keyCode Indicates the key code. 3090 * @return Returns the pointer to the key item. 3091 * @since 9 3092 */ 3093 const KeyItem* GetKeyItem(int32_t keyCode) const; 3094 3095 /** 3096 * @brief Checks whether this key event is valid. 3097 * @return Returns <b>true</b> if the key event is valid; returns <b>false</b> otherwise. 3098 * @since 9 3099 */ 3100 bool IsValid() const; 3101 3102 /** 3103 * @brief 把指定的按键转换为功能按键。 3104 * @param keyCode 待转换的键值。 3105 * @return 返回转换后的功能按键。 3106 * @since 9 3107 */ 3108 int32_t TransitionFunctionKey(int32_t keyCode); 3109 3110 /** 3111 * @brief 给指定的功能按键设置使能状态。 3112 * @param funcKey 指定的功能按键。 3113 * @param value 待设置的功能按键状态。 3114 * @return 返回是否设置成功。 3115 * @since 9 3116 */ 3117 int32_t SetFunctionKey(int32_t funcKey, int32_t value); 3118 3119 /** 3120 * @brief 获取指定功能按键的使能状态。 3121 * @param funcKey 指定的功能按键。 3122 * @return 返回指定功能按键的使能状态。 3123 * @since 9 3124 */ 3125 bool GetFunctionKey(int32_t funcKey) const; 3126 3127 public: 3128 /** 3129 * @brief Writes data to a <b>Parcel</b> object. 3130 * @param out Indicates the object into which data will be written. 3131 * @return Returns <b>true</b> if the data is successfully written; returns <b>false</b> otherwise. 3132 * @since 9 3133 */ 3134 bool WriteToParcel(Parcel &out) const; 3135 3136 /** 3137 * @brief Reads data from a <b>Parcel</b> object. 3138 * @param in Indicates the object from which data will be read. 3139 * @return Returns <b>true</b> if the data is successfully read; returns <b>false</b> otherwise. 3140 * @since 9 3141 */ 3142 bool ReadFromParcel(Parcel &in); 3143 3144 protected: 3145 /** 3146 * @brief Constructs an input event object by using the specified input event type. Generally, this method 3147 * is used to construct a base class object when constructing a derived class object. 3148 * @since 9 3149 */ 3150 explicit KeyEvent(int32_t eventType); 3151 3152 private: 3153 bool IsValidKeyItem() const; 3154 3155 private: 3156 int32_t keyCode_ { -1 }; 3157 std::vector<KeyItem> keys_; 3158 int32_t keyAction_ { 0 }; 3159 bool numLock_ { false }; 3160 bool capsLock_ { false }; 3161 bool scrollLock_ { false }; 3162 }; 3163 } // namespace MMI 3164 } // namespace OHOS 3165 #endif // KEY_EVENT_H