Changeset d05c237 in mainline
- Timestamp:
- 2024-10-03T18:00:30Z (3 months ago)
- Branches:
- master
- Children:
- b2c9e42c
- Parents:
- 6907f26
- Location:
- uspace/lib/vt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/vt/include/vt/vt100.h
r6907f26 rd05c237 99 99 /** Prefix 1b 5b 31 39 */ 100 100 vts_1b5b3139, 101 /** Prefix 1b 5b 31 3b */ 102 vts_1b5b313b, 103 /** Prefix 1b 5b 31 3b 32 */ 104 vts_1b5b313b32, 105 /** Prefix 1b 5b 31 3b 33 */ 106 vts_1b5b313b33, 101 107 /** Prefix 1b 5b 32 */ 102 108 vts_1b5b32, -
uspace/lib/vt/src/vt100.c
r6907f26 rd05c237 603 603 vt->state = vts_1b5b3139; 604 604 break; 605 case 0x3b: 606 vt->state = vts_1b5b313b; 607 break; 605 608 default: 606 609 vt->state = vts_base; … … 670 673 case 0x7e: 671 674 vt100_key(vt, 0, KC_F8, 0); 675 break; 676 default: 677 vt->state = vts_base; 678 break; 679 } 680 } 681 682 /** Process input character with prefix 1b 5b 31 3b. 683 * 684 * @param vt VT instance 685 * @param c Input character 686 */ 687 static void vt100_rcvd_1b5b313b(vt100_t *vt, char c) 688 { 689 switch (c) { 690 case 0x32: 691 vt->state = vts_1b5b313b32; 692 break; 693 case 0x33: 694 vt->state = vts_1b5b313b33; 695 break; 696 default: 697 vt->state = vts_base; 698 break; 699 } 700 } 701 702 /** Process input character with prefix 1b 5b 31 3b 32. 703 * 704 * @param vt VT instance 705 * @param c Input character 706 */ 707 static void vt100_rcvd_1b5b313b32(vt100_t *vt, char c) 708 { 709 switch (c) { 710 case 0x41: 711 vt100_key(vt, KM_SHIFT, KC_UP, 0); 712 break; 713 case 0x44: 714 vt100_key(vt, KM_SHIFT, KC_LEFT, 0); 715 break; 716 case 0x42: 717 vt100_key(vt, KM_SHIFT, KC_DOWN, 0); 718 break; 719 case 0x43: 720 vt100_key(vt, KM_SHIFT, KC_RIGHT, 0); 721 break; 722 case 0x48: 723 vt100_key(vt, KM_SHIFT, KC_HOME, 0); 724 break; 725 case 0x46: 726 vt100_key(vt, KM_SHIFT, KC_END, 0); 727 break; 728 default: 729 vt->state = vts_base; 730 break; 731 } 732 } 733 734 /** Process input character with prefix 1b 5b 31 3b 33. 735 * 736 * @param vt VT instance 737 * @param c Input character 738 */ 739 static void vt100_rcvd_1b5b313b33(vt100_t *vt, char c) 740 { 741 switch (c) { 742 case 0x41: 743 vt100_key(vt, KM_ALT, KC_UP, 0); 744 break; 745 case 0x44: 746 vt100_key(vt, KM_ALT, KC_LEFT, 0); 747 break; 748 case 0x42: 749 vt100_key(vt, KM_ALT, KC_DOWN, 0); 750 break; 751 case 0x43: 752 vt100_key(vt, KM_ALT, KC_RIGHT, 0); 753 break; 754 case 0x48: 755 vt100_key(vt, KM_ALT, KC_HOME, 0); 756 break; 757 case 0x46: 758 vt100_key(vt, KM_ALT, KC_END, 0); 672 759 break; 673 760 default: … … 1310 1397 vt100_rcvd_1b5b3139(vt, c); 1311 1398 break; 1399 case vts_1b5b313b: 1400 vt100_rcvd_1b5b313b(vt, c); 1401 break; 1402 case vts_1b5b313b32: 1403 vt100_rcvd_1b5b313b32(vt, c); 1404 break; 1405 case vts_1b5b313b33: 1406 vt100_rcvd_1b5b313b33(vt, c); 1407 break; 1312 1408 case vts_1b5b32: 1313 1409 vt100_rcvd_1b5b32(vt, c);
Note:
See TracChangeset
for help on using the changeset viewer.