Mercurial > emacs
comparison lisp/term/xterm.el @ 83636:a53f9d3dc94d
(terminal-init-xterm): Revert bad merge from trunk.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 18 Jun 2007 15:46:57 +0000 |
parents | 9c01792a3ce8 |
children | 38ddb24da427 |
comparison
equal
deleted
inserted
replaced
83635:9c01792a3ce8 | 83636:a53f9d3dc94d |
---|---|
241 (define-key xterm-function-map "\e[27;14;34~" [?\C-\M-\"]) | 241 (define-key xterm-function-map "\e[27;14;34~" [?\C-\M-\"]) |
242 (define-key xterm-function-map "\e[27;14;35~" [?\C-\M-#]) | 242 (define-key xterm-function-map "\e[27;14;35~" [?\C-\M-#]) |
243 (define-key xterm-function-map "\e[27;14;36~" [?\C-\M-$]) | 243 (define-key xterm-function-map "\e[27;14;36~" [?\C-\M-$]) |
244 (define-key xterm-function-map "\e[27;14;37~" [?\C-\M-%]) | 244 (define-key xterm-function-map "\e[27;14;37~" [?\C-\M-%]) |
245 (define-key xterm-function-map "\e[27;14;38~" [?\C-\M-&]) | 245 (define-key xterm-function-map "\e[27;14;38~" [?\C-\M-&]) |
246 (define-key xterm-function-map "\e[27;14;40~" [?\C-\M-(]) | 246 (define-key xterm-function-map "\e[27;14;40~" [?\C-\M-\(]) |
247 (define-key xterm-function-map "\e[27;14;41~" [?\C-\M-)]) | 247 (define-key xterm-function-map "\e[27;14;41~" [?\C-\M-\)]) |
248 (define-key xterm-function-map "\e[27;14;42~" [?\C-\M-*]) | 248 (define-key xterm-function-map "\e[27;14;42~" [?\C-\M-*]) |
249 (define-key xterm-function-map "\e[27;14;43~" [?\C-\M-+]) | 249 (define-key xterm-function-map "\e[27;14;43~" [?\C-\M-+]) |
250 (define-key xterm-function-map "\e[27;14;58~" [?\C-\M-:]) | 250 (define-key xterm-function-map "\e[27;14;58~" [?\C-\M-:]) |
251 (define-key xterm-function-map "\e[27;14;60~" [?\C-\M-<]) | 251 (define-key xterm-function-map "\e[27;14;60~" [?\C-\M-<]) |
252 (define-key xterm-function-map "\e[27;14;62~" [?\C-\M->]) | 252 (define-key xterm-function-map "\e[27;14;62~" [?\C-\M->]) |
279 (define-key xterm-function-map "\e[27;8;34~" [?\C-\M-\"]) | 279 (define-key xterm-function-map "\e[27;8;34~" [?\C-\M-\"]) |
280 (define-key xterm-function-map "\e[27;8;35~" [?\C-\M-#]) | 280 (define-key xterm-function-map "\e[27;8;35~" [?\C-\M-#]) |
281 (define-key xterm-function-map "\e[27;8;36~" [?\C-\M-$]) | 281 (define-key xterm-function-map "\e[27;8;36~" [?\C-\M-$]) |
282 (define-key xterm-function-map "\e[27;8;37~" [?\C-\M-%]) | 282 (define-key xterm-function-map "\e[27;8;37~" [?\C-\M-%]) |
283 (define-key xterm-function-map "\e[27;8;38~" [?\C-\M-&]) | 283 (define-key xterm-function-map "\e[27;8;38~" [?\C-\M-&]) |
284 (define-key xterm-function-map "\e[27;8;40~" [?\C-\M-(]) | 284 (define-key xterm-function-map "\e[27;8;40~" [?\C-\M-\(]) |
285 (define-key xterm-function-map "\e[27;8;41~" [?\C-\M-)]) | 285 (define-key xterm-function-map "\e[27;8;41~" [?\C-\M-\)]) |
286 (define-key xterm-function-map "\e[27;8;42~" [?\C-\M-*]) | 286 (define-key xterm-function-map "\e[27;8;42~" [?\C-\M-*]) |
287 (define-key xterm-function-map "\e[27;8;43~" [?\C-\M-+]) | 287 (define-key xterm-function-map "\e[27;8;43~" [?\C-\M-+]) |
288 (define-key xterm-function-map "\e[27;8;58~" [?\C-\M-:]) | 288 (define-key xterm-function-map "\e[27;8;58~" [?\C-\M-:]) |
289 (define-key xterm-function-map "\e[27;8;60~" [?\C-\M-<]) | 289 (define-key xterm-function-map "\e[27;8;60~" [?\C-\M-<]) |
290 (define-key xterm-function-map "\e[27;8;62~" [?\C-\M->]) | 290 (define-key xterm-function-map "\e[27;8;62~" [?\C-\M->]) |
395 | 395 |
396 ;; Use inheritance to let the main keymap override those defaults. | 396 ;; Use inheritance to let the main keymap override those defaults. |
397 ;; This way we don't override terminfo-derived settings or settings | 397 ;; This way we don't override terminfo-derived settings or settings |
398 ;; made in the .emacs file. | 398 ;; made in the .emacs file. |
399 (set-keymap-parent map (keymap-parent local-function-key-map)) | 399 (set-keymap-parent map (keymap-parent local-function-key-map)) |
400 (set-keymap-parent local-function-key-map map) | 400 (set-keymap-parent local-function-key-map map))) |
401 | |
402 ;; xterm from X.org 6.8.2 uses these key definitions. | |
403 (define-key map "\eOP" [f1]) | |
404 (define-key map "\eOQ" [f2]) | |
405 (define-key map "\eOR" [f3]) | |
406 (define-key map "\eOS" [f4]) | |
407 (define-key map "\e[15~" [f5]) | |
408 (define-key map "\e[17~" [f6]) | |
409 (define-key map "\e[18~" [f7]) | |
410 (define-key map "\e[19~" [f8]) | |
411 (define-key map "\e[20~" [f9]) | |
412 (define-key map "\e[21~" [f10]) | |
413 (define-key map "\e[23~" [f11]) | |
414 (define-key map "\e[24~" [f12]) | |
415 | |
416 (define-key map "\eO2P" [S-f1]) | |
417 (define-key map "\eO2Q" [S-f2]) | |
418 (define-key map "\eO2R" [S-f3]) | |
419 (define-key map "\eO2S" [S-f4]) | |
420 (define-key map "\e[1;2P" [S-f1]) | |
421 (define-key map "\e[1;2Q" [S-f2]) | |
422 (define-key map "\e[1;2R" [S-f3]) | |
423 (define-key map "\e[1;2S" [S-f4]) | |
424 (define-key map "\e[15;2~" [S-f5]) | |
425 (define-key map "\e[17;2~" [S-f6]) | |
426 (define-key map "\e[18;2~" [S-f7]) | |
427 (define-key map "\e[19;2~" [S-f8]) | |
428 (define-key map "\e[20;2~" [S-f9]) | |
429 (define-key map "\e[21;2~" [S-f10]) | |
430 (define-key map "\e[23;2~" [S-f11]) | |
431 (define-key map "\e[24;2~" [S-f12]) | |
432 | |
433 (define-key map "\eO5P" [C-f1]) | |
434 (define-key map "\eO5Q" [C-f2]) | |
435 (define-key map "\eO5R" [C-f3]) | |
436 (define-key map "\eO5S" [C-f4]) | |
437 (define-key map "\e[15;5~" [C-f5]) | |
438 (define-key map "\e[17;5~" [C-f6]) | |
439 (define-key map "\e[18;5~" [C-f7]) | |
440 (define-key map "\e[19;5~" [C-f8]) | |
441 (define-key map "\e[20;5~" [C-f9]) | |
442 (define-key map "\e[21;5~" [C-f10]) | |
443 (define-key map "\e[23;5~" [C-f11]) | |
444 (define-key map "\e[24;5~" [C-f12]) | |
445 | |
446 (define-key map "\eO6P" [C-S-f1]) | |
447 (define-key map "\eO6Q" [C-S-f2]) | |
448 (define-key map "\eO6R" [C-S-f3]) | |
449 (define-key map "\eO6S" [C-S-f4]) | |
450 (define-key map "\e[15;6~" [C-S-f5]) | |
451 (define-key map "\e[17;6~" [C-S-f6]) | |
452 (define-key map "\e[18;6~" [C-S-f7]) | |
453 (define-key map "\e[19;6~" [C-S-f8]) | |
454 (define-key map "\e[20;6~" [C-S-f9]) | |
455 (define-key map "\e[21;6~" [C-S-f10]) | |
456 (define-key map "\e[23;6~" [C-S-f11]) | |
457 (define-key map "\e[24;6~" [C-S-f12]) | |
458 | |
459 (define-key map "\eO3P" [A-f1]) | |
460 (define-key map "\eO3Q" [A-f2]) | |
461 (define-key map "\eO3R" [A-f3]) | |
462 (define-key map "\eO3S" [A-f4]) | |
463 (define-key map "\e[15;3~" [A-f5]) | |
464 (define-key map "\e[17;3~" [A-f6]) | |
465 (define-key map "\e[18;3~" [A-f7]) | |
466 (define-key map "\e[19;3~" [A-f8]) | |
467 (define-key map "\e[20;3~" [A-f9]) | |
468 (define-key map "\e[21;3~" [A-f10]) | |
469 (define-key map "\e[23;3~" [A-f11]) | |
470 (define-key map "\e[24;3~" [A-f12]) | |
471 | |
472 (define-key map "\eOA" [up]) | |
473 (define-key map "\eOB" [down]) | |
474 (define-key map "\eOC" [right]) | |
475 (define-key map "\eOD" [left]) | |
476 (define-key map "\eOF" [end]) | |
477 (define-key map "\eOH" [home]) | |
478 | |
479 (define-key map "\e[1;2A" [S-up]) | |
480 (define-key map "\e[1;2B" [S-down]) | |
481 (define-key map "\e[1;2C" [S-right]) | |
482 (define-key map "\e[1;2D" [S-left]) | |
483 (define-key map "\e[1;2F" [S-end]) | |
484 (define-key map "\e[1;2H" [S-home]) | |
485 | |
486 (define-key map "\e[1;5A" [C-up]) | |
487 (define-key map "\e[1;5B" [C-down]) | |
488 (define-key map "\e[1;5C" [C-right]) | |
489 (define-key map "\e[1;5D" [C-left]) | |
490 (define-key map "\e[1;5F" [C-end]) | |
491 (define-key map "\e[1;5H" [C-home]) | |
492 | |
493 (define-key map "\e[1;6A" [C-S-up]) | |
494 (define-key map "\e[1;6B" [C-S-down]) | |
495 (define-key map "\e[1;6C" [C-S-right]) | |
496 (define-key map "\e[1;6D" [C-S-left]) | |
497 (define-key map "\e[1;6F" [C-S-end]) | |
498 (define-key map "\e[1;6H" [C-S-home]) | |
499 | |
500 (define-key map "\e[1;3A" [A-up]) | |
501 (define-key map "\e[1;3B" [A-down]) | |
502 (define-key map "\e[1;3C" [A-right]) | |
503 (define-key map "\e[1;3D" [A-left]) | |
504 (define-key map "\e[1;3F" [A-end]) | |
505 (define-key map "\e[1;3H" [A-home]) | |
506 | |
507 (define-key map "\e[2~" [insert]) | |
508 (define-key map "\e[3~" [delete]) | |
509 (define-key map "\e[5~" [prior]) | |
510 (define-key map "\e[6~" [next]) | |
511 | |
512 (define-key map "\e[2;2~" [S-insert]) | |
513 (define-key map "\e[3;2~" [S-delete]) | |
514 (define-key map "\e[5;2~" [S-prior]) | |
515 (define-key map "\e[6;2~" [S-next]) | |
516 | |
517 (define-key map "\e[2;5~" [C-insert]) | |
518 (define-key map "\e[3;5~" [C-delete]) | |
519 (define-key map "\e[5;5~" [C-prior]) | |
520 (define-key map "\e[6;5~" [C-next]) | |
521 | |
522 (define-key map "\e[2;6~" [C-S-insert]) | |
523 (define-key map "\e[3;6~" [C-S-delete]) | |
524 (define-key map "\e[5;6~" [C-S-prior]) | |
525 (define-key map "\e[6;6~" [C-S-next]) | |
526 | |
527 (define-key map "\e[2;3~" [A-insert]) | |
528 (define-key map "\e[3;3~" [A-delete]) | |
529 (define-key map "\e[5;3~" [A-prior]) | |
530 (define-key map "\e[6;3~" [A-next]) | |
531 | |
532 (define-key map "\e[4~" [select]) | |
533 (define-key map "\e[29~" [print]) | |
534 | |
535 (define-key map "\eOj" [kp-multiply]) | |
536 (define-key map "\eOk" [kp-add]) | |
537 (define-key map "\eOl" [kp-separator]) | |
538 (define-key map "\eOm" [kp-subtract]) | |
539 (define-key map "\eOo" [kp-divide]) | |
540 (define-key map "\eOp" [kp-0]) | |
541 (define-key map "\eOq" [kp-1]) | |
542 (define-key map "\eOr" [kp-2]) | |
543 (define-key map "\eOs" [kp-3]) | |
544 (define-key map "\eOt" [kp-4]) | |
545 (define-key map "\eOu" [kp-5]) | |
546 (define-key map "\eOv" [kp-6]) | |
547 (define-key map "\eOw" [kp-7]) | |
548 (define-key map "\eOx" [kp-8]) | |
549 (define-key map "\eOy" [kp-9]) | |
550 | |
551 ;; These keys are available in xterm starting from version 216 | |
552 ;; if the modifyOtherKeys resource is set to 1. | |
553 | |
554 (define-key map "\e[27;5;9~" [C-tab]) | |
555 (define-key map "\e[27;5;13~" [C-return]) | |
556 (define-key map "\e[27;5;39~" [?\C-\']) | |
557 (define-key map "\e[27;5;44~" [?\C-,]) | |
558 (define-key map "\e[27;5;45~" [?\C--]) | |
559 (define-key map "\e[27;5;46~" [?\C-.]) | |
560 (define-key map "\e[27;5;47~" [?\C-/]) | |
561 (define-key map "\e[27;5;48~" [?\C-0]) | |
562 (define-key map "\e[27;5;49~" [?\C-1]) | |
563 ;; Not all C-DIGIT keys have a distinct binding. | |
564 (define-key map "\e[27;5;57~" [?\C-9]) | |
565 (define-key map "\e[27;5;59~" [?\C-\;]) | |
566 (define-key map "\e[27;5;61~" [?\C-=]) | |
567 (define-key map "\e[27;5;92~" [?\C-\\]) | |
568 | |
569 (define-key map "\e[27;6;33~" [?\C-!]) | |
570 (define-key map "\e[27;6;34~" [?\C-\"]) | |
571 (define-key map "\e[27;6;35~" [?\C-#]) | |
572 (define-key map "\e[27;6;36~" [?\C-$]) | |
573 (define-key map "\e[27;6;37~" [?\C-%]) | |
574 (define-key map "\e[27;6;38~" [?\C-&]) | |
575 (define-key map "\e[27;6;40~" [?\C-\(]) | |
576 (define-key map "\e[27;6;41~" [?\C-\)]) | |
577 (define-key map "\e[27;6;42~" [?\C-*]) | |
578 (define-key map "\e[27;6;43~" [?\C-+]) | |
579 (define-key map "\e[27;6;58~" [?\C-:]) | |
580 (define-key map "\e[27;6;60~" [?\C-<]) | |
581 (define-key map "\e[27;6;62~" [?\C->]) | |
582 (define-key map "\e[27;6;63~" [(control ??)]) | |
583 | |
584 ;; These are the strings emitted for various C-M- combinations | |
585 ;; for keyboards that the Meta and Alt modifiers are on the same | |
586 ;; key (usually labeled "Alt"). | |
587 (define-key map "\e[27;13;9~" [C-M-tab]) | |
588 (define-key map "\e[27;13;13~" [C-M-return]) | |
589 | |
590 (define-key map "\e[27;13;39~" [?\C-\M-\']) | |
591 (define-key map "\e[27;13;44~" [?\C-\M-,]) | |
592 (define-key map "\e[27;13;45~" [?\C-\M--]) | |
593 (define-key map "\e[27;13;46~" [?\C-\M-.]) | |
594 (define-key map "\e[27;13;47~" [?\C-\M-/]) | |
595 (define-key map "\e[27;13;48~" [?\C-\M-0]) | |
596 (define-key map "\e[27;13;49~" [?\C-\M-1]) | |
597 (define-key map "\e[27;13;50~" [?\C-\M-2]) | |
598 (define-key map "\e[27;13;51~" [?\C-\M-3]) | |
599 (define-key map "\e[27;13;52~" [?\C-\M-4]) | |
600 (define-key map "\e[27;13;53~" [?\C-\M-5]) | |
601 (define-key map "\e[27;13;54~" [?\C-\M-6]) | |
602 (define-key map "\e[27;13;55~" [?\C-\M-7]) | |
603 (define-key map "\e[27;13;56~" [?\C-\M-8]) | |
604 (define-key map "\e[27;13;57~" [?\C-\M-9]) | |
605 (define-key map "\e[27;13;59~" [?\C-\M-\;]) | |
606 (define-key map "\e[27;13;61~" [?\C-\M-=]) | |
607 (define-key map "\e[27;13;92~" [?\C-\M-\\]) | |
608 | |
609 (define-key map "\e[27;14;33~" [?\C-\M-!]) | |
610 (define-key map "\e[27;14;34~" [?\C-\M-\"]) | |
611 (define-key map "\e[27;14;35~" [?\C-\M-#]) | |
612 (define-key map "\e[27;14;36~" [?\C-\M-$]) | |
613 (define-key map "\e[27;14;37~" [?\C-\M-%]) | |
614 (define-key map "\e[27;14;38~" [?\C-\M-&]) | |
615 (define-key map "\e[27;14;40~" [?\C-\M-\(]) | |
616 (define-key map "\e[27;14;41~" [?\C-\M-\)]) | |
617 (define-key map "\e[27;14;42~" [?\C-\M-*]) | |
618 (define-key map "\e[27;14;43~" [?\C-\M-+]) | |
619 (define-key map "\e[27;14;58~" [?\C-\M-:]) | |
620 (define-key map "\e[27;14;60~" [?\C-\M-<]) | |
621 (define-key map "\e[27;14;62~" [?\C-\M->]) | |
622 (define-key map "\e[27;14;63~" [(control meta ??)]) | |
623 | |
624 (define-key map "\e[27;7;9~" [C-M-tab]) | |
625 (define-key map "\e[27;7;13~" [C-M-return]) | |
626 | |
627 (define-key map "\e[27;7;32~" [?\C-\M-\s]) | |
628 (define-key map "\e[27;7;39~" [?\C-\M-\']) | |
629 (define-key map "\e[27;7;44~" [?\C-\M-,]) | |
630 (define-key map "\e[27;7;45~" [?\C-\M--]) | |
631 (define-key map "\e[27;7;46~" [?\C-\M-.]) | |
632 (define-key map "\e[27;7;47~" [?\C-\M-/]) | |
633 (define-key map "\e[27;7;48~" [?\C-\M-0]) | |
634 (define-key map "\e[27;7;49~" [?\C-\M-1]) | |
635 (define-key map "\e[27;7;50~" [?\C-\M-2]) | |
636 (define-key map "\e[27;7;51~" [?\C-\M-3]) | |
637 (define-key map "\e[27;7;52~" [?\C-\M-4]) | |
638 (define-key map "\e[27;7;53~" [?\C-\M-5]) | |
639 (define-key map "\e[27;7;54~" [?\C-\M-6]) | |
640 (define-key map "\e[27;7;55~" [?\C-\M-7]) | |
641 (define-key map "\e[27;7;56~" [?\C-\M-8]) | |
642 (define-key map "\e[27;7;57~" [?\C-\M-9]) | |
643 (define-key map "\e[27;7;59~" [?\C-\M-\;]) | |
644 (define-key map "\e[27;7;61~" [?\C-\M-=]) | |
645 (define-key map "\e[27;7;92~" [?\C-\M-\\]) | |
646 | |
647 (define-key map "\e[27;8;33~" [?\C-\M-!]) | |
648 (define-key map "\e[27;8;34~" [?\C-\M-\"]) | |
649 (define-key map "\e[27;8;35~" [?\C-\M-#]) | |
650 (define-key map "\e[27;8;36~" [?\C-\M-$]) | |
651 (define-key map "\e[27;8;37~" [?\C-\M-%]) | |
652 (define-key map "\e[27;8;38~" [?\C-\M-&]) | |
653 (define-key map "\e[27;8;40~" [?\C-\M-\(]) | |
654 (define-key map "\e[27;8;41~" [?\C-\M-\)]) | |
655 (define-key map "\e[27;8;42~" [?\C-\M-*]) | |
656 (define-key map "\e[27;8;43~" [?\C-\M-+]) | |
657 (define-key map "\e[27;8;58~" [?\C-\M-:]) | |
658 (define-key map "\e[27;8;60~" [?\C-\M-<]) | |
659 (define-key map "\e[27;8;62~" [?\C-\M->]) | |
660 (define-key map "\e[27;8;63~" [(control meta ??)]) | |
661 | |
662 (define-key map "\e[27;2;9~" [S-tab]) | |
663 (define-key map "\e[27;2;13~" [S-return]) | |
664 | |
665 (define-key map "\e[27;6;9~" [C-S-tab]) | |
666 (define-key map "\e[27;6;13~" [C-S-return]) | |
667 | |
668 ;; Other versions of xterm might emit these. | |
669 (define-key map "\e[A" [up]) | |
670 (define-key map "\e[B" [down]) | |
671 (define-key map "\e[C" [right]) | |
672 (define-key map "\e[D" [left]) | |
673 (define-key map "\e[1~" [home]) | |
674 | |
675 (define-key map "\eO2A" [S-up]) | |
676 (define-key map "\eO2B" [S-down]) | |
677 (define-key map "\eO2C" [S-right]) | |
678 (define-key map "\eO2D" [S-left]) | |
679 (define-key map "\eO2F" [S-end]) | |
680 (define-key map "\eO2H" [S-home]) | |
681 | |
682 (define-key map "\eO5A" [C-up]) | |
683 (define-key map "\eO5B" [C-down]) | |
684 (define-key map "\eO5C" [C-right]) | |
685 (define-key map "\eO5D" [C-left]) | |
686 (define-key map "\eO5F" [C-end]) | |
687 (define-key map "\eO5H" [C-home]) | |
688 | |
689 (define-key map "\e[11~" [f1]) | |
690 (define-key map "\e[12~" [f2]) | |
691 (define-key map "\e[13~" [f3]) | |
692 (define-key map "\e[14~" [f4])) | |
693 | 401 |
694 (xterm-register-default-colors) | 402 (xterm-register-default-colors) |
695 ;; This recomputes all the default faces given the colors we've just set up. | 403 ;; This recomputes all the default faces given the colors we've just set up. |
696 (tty-set-up-initial-frame-faces)) | 404 (tty-set-up-initial-frame-faces)) |
697 | 405 |