|
|
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 | |
… | |
… | |
213 | if (suffix && middle && suffix > middle + 1) |
236 | if (suffix && middle && suffix > middle + 1) |
214 | { |
237 | { |
215 | key->type = keysym_t::LIST; |
238 | key->type = keysym_t::LIST; |
216 | key->range = suffix - middle - 1; |
239 | key->range = suffix - middle - 1; |
217 | |
240 | |
218 | strcpy (translation, translation + 4); |
241 | memmove (translation, translation + 4, strlen (translation + 4) + 1); |
219 | } |
242 | } |
220 | else |
243 | else |
221 | rxvt_warn ("cannot parse list-type keysym '%s', treating as normal keysym.\n", translation); |
244 | rxvt_warn ("cannot parse list-type keysym '%s', treating as normal keysym.\n", translation); |
222 | } |
245 | } |
223 | else if (strncmp (translation, "builtin:", 8) == 0) |
246 | else if (strncmp (translation, "builtin:", 8) == 0) |