comparison src/libvterm/src/state.c @ 31243:984ebd1f6605 v9.0.0955

patch 9.0.0955: libvterm does not support the XTQMODKEYS request Commit: https://github.com/vim/vim/commit/cc0907165d388e4e8842d3bda9e24ed4d932d6b8 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 27 11:31:23 2022 +0000 patch 9.0.0955: libvterm does not support the XTQMODKEYS request Problem: Libvterm does not support the XTQMODKEYS request. Solution: Implement the XTQMODKEYS request and response. Update the keycode check results.
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Nov 2022 12:45:05 +0100
parents dcde141f2d1e
children b13f723a7ec6
comparison
equal deleted inserted replaced
31242:f12d4937f67b 31243:984ebd1f6605
1398 1398
1399 case 0x6d: // SGR - ECMA-48 8.3.117 1399 case 0x6d: // SGR - ECMA-48 8.3.117
1400 vterm_state_setpen(state, args, argcount); 1400 vterm_state_setpen(state, args, argcount);
1401 break; 1401 break;
1402 1402
1403 case LEADER('?', 0x6d): // DECSGR 1403 case LEADER('?', 0x6d): // DECSGR and XTQMODKEYS
1404 // CSI ? 4 m XTQMODKEYS: request modifyOtherKeys level
1405 if (argcount == 1 && CSI_ARG(args[0]) == 4)
1406 {
1407 vterm_push_output_sprintf_ctrl(state->vt, C1_CSI, ">4;%dm",
1408 state->mode.modify_other_keys ? 2 : 0);
1409 break;
1410 }
1411
1404 /* No actual DEC terminal recognised these, but some printers did. These 1412 /* No actual DEC terminal recognised these, but some printers did. These
1405 * are alternative ways to request subscript/superscript/off 1413 * are alternative ways to request subscript/superscript/off
1406 */ 1414 */
1407 for(int argi = 0; argi < argcount; argi++) { 1415 for(int argi = 0; argi < argcount; argi++) {
1408 long arg; 1416 long arg;
1422 } 1430 }
1423 } 1431 }
1424 break; 1432 break;
1425 1433
1426 case LEADER('>', 0x6d): // CSI > 4 ; Pv m xterm resource modifyOtherKeys 1434 case LEADER('>', 0x6d): // CSI > 4 ; Pv m xterm resource modifyOtherKeys
1427 if (argcount == 2 && args[0] == 4) 1435 if (argcount == 2 && CSI_ARG(args[0]) == 4)
1428 { 1436 {
1429 // can't have both modify_other_keys and kitty_keyboard 1437 // can't have both modify_other_keys and kitty_keyboard
1430 state->mode.kitty_keyboard = 0; 1438 state->mode.kitty_keyboard = 0;
1431 1439
1432 state->mode.modify_other_keys = args[1] == 2; 1440 state->mode.modify_other_keys = CSI_ARG(args[1]) == 2;
1433 } 1441 }
1434 break; 1442 break;
1435 1443
1436 case LEADER('>', 0x75): // CSI > 1 u enable kitty keyboard protocol 1444 case LEADER('>', 0x75): // CSI > 1 u enable kitty keyboard protocol
1437 if (argcount == 1 && args[0] == 1) 1445 if (argcount == 1 && CSI_ARG(args[0]) == 1)
1438 { 1446 {
1439 // can't have both modify_other_keys and kitty_keyboard 1447 // can't have both modify_other_keys and kitty_keyboard
1440 state->mode.modify_other_keys = 0; 1448 state->mode.modify_other_keys = 0;
1441 1449
1442 state->mode.kitty_keyboard = 1; 1450 state->mode.kitty_keyboard = 1;