|
|
1 | /*----------------------------------------------------------------------* |
|
|
2 | * File: keyboard.C |
|
|
3 | *----------------------------------------------------------------------* |
|
|
4 | * |
|
|
5 | * All portions of code are copyright by their respective author/s. |
|
|
6 | * Copyright (c) 2005 WU Fengguang |
|
|
7 | * Copyright (c) 2005-2006 Marc Lehmann <pcg@goof.com> |
|
|
8 | * |
|
|
9 | * This program is free software; you can redistribute it and/or modify |
|
|
10 | * it under the terms of the GNU General Public License as published by |
|
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
|
12 | * (at your option) any later version. |
|
|
13 | * |
|
|
14 | * This program is distributed in the hope that it will be useful, |
|
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
17 | * GNU General Public License for more details. |
|
|
18 | * |
|
|
19 | * You should have received a copy of the GNU General Public License |
|
|
20 | * along with this program; if not, write to the Free Software |
|
|
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
|
22 | *----------------------------------------------------------------------*/ |
|
|
23 | |
1 | #include "../config.h" |
24 | #include "../config.h" |
2 | #include "rxvt.h" |
25 | #include "rxvt.h" |
3 | |
26 | |
4 | #ifdef KEYSYM_RESOURCE |
27 | #ifdef KEYSYM_RESOURCE |
5 | |
28 | |
… | |
… | |
74 | output_string (rxvt_term *rt, const char *str) |
97 | output_string (rxvt_term *rt, const char *str) |
75 | { |
98 | { |
76 | if (strncmp (str, "command:", 8) == 0) |
99 | if (strncmp (str, "command:", 8) == 0) |
77 | rt->cmd_write (str + 8, strlen (str) - 8); |
100 | rt->cmd_write (str + 8, strlen (str) - 8); |
78 | else if (strncmp (str, "perl:", 5) == 0) |
101 | else if (strncmp (str, "perl:", 5) == 0) |
79 | HOOK_INVOKE((rt, HOOK_KEYBOARD_COMMAND, DT_STR, str + 5, DT_END)); |
102 | HOOK_INVOKE((rt, HOOK_USER_COMMAND, DT_STR, str + 5, DT_END)); |
80 | else |
103 | else |
81 | rt->tt_write (str, strlen (str)); |
104 | rt->tt_write (str, strlen (str)); |
82 | } |
105 | } |
83 | |
106 | |
84 | static void |
107 | static void |