comparison src/keymap.c @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents c5d627a313b1
children 558f606b08ae
comparison
equal deleted inserted replaced
281:090b52736db2 282:c42ec1d1cded
239 Lisp_Object Qbutton0, Qbutton1, Qbutton2, Qbutton3; 239 Lisp_Object Qbutton0, Qbutton1, Qbutton2, Qbutton3;
240 Lisp_Object Qbutton4, Qbutton5, Qbutton6, Qbutton7; 240 Lisp_Object Qbutton4, Qbutton5, Qbutton6, Qbutton7;
241 Lisp_Object Qbutton0up, Qbutton1up, Qbutton2up, Qbutton3up; 241 Lisp_Object Qbutton0up, Qbutton1up, Qbutton2up, Qbutton3up;
242 Lisp_Object Qbutton4up, Qbutton5up, Qbutton6up, Qbutton7up; 242 Lisp_Object Qbutton4up, Qbutton5up, Qbutton6up, Qbutton7up;
243 243
244 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
245 Lisp_Object Qdrop0, Qdrop1, Qdrop2, Qdrop3, Qdrop4, Qdrop5, Qdrop6, Qdrop7;
246 #endif
247 Lisp_Object Qmenu_selection; 244 Lisp_Object Qmenu_selection;
248 /* Emacs compatibility */ 245 /* Emacs compatibility */
249 Lisp_Object Qdown_mouse_1, Qdown_mouse_2, Qdown_mouse_3, Qdown_mouse_4, 246 Lisp_Object Qdown_mouse_1, Qdown_mouse_2, Qdown_mouse_3, Qdown_mouse_4,
250 Qdown_mouse_5; 247 Qdown_mouse_5;
251 Lisp_Object Qmouse_1, Qmouse_2, Qmouse_3, Qmouse_4, Qmouse_5; 248 Lisp_Object Qmouse_1, Qmouse_2, Qmouse_3, Qmouse_4, Qmouse_5;
1440 returned_value->keysym = (down ? Qbutton0 : Qbutton0up); break; 1437 returned_value->keysym = (down ? Qbutton0 : Qbutton0up); break;
1441 } 1438 }
1442 returned_value->modifiers = XEVENT (spec)->event.button.modifiers; 1439 returned_value->modifiers = XEVENT (spec)->event.button.modifiers;
1443 break; 1440 break;
1444 } 1441 }
1445 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
1446 case dnd_drop_event:
1447 {
1448 switch (XEVENT (spec)->event.dnd_drop.button)
1449 {
1450 case 1:
1451 returned_value->keysym = Qdrop1; break;
1452 case 2:
1453 returned_value->keysym = Qdrop2; break;
1454 case 3:
1455 returned_value->keysym = Qdrop3; break;
1456 case 4:
1457 returned_value->keysym = Qdrop4; break;
1458 case 5:
1459 returned_value->keysym = Qdrop5; break;
1460 case 6:
1461 returned_value->keysym = Qdrop6; break;
1462 case 7:
1463 returned_value->keysym = Qdrop7; break;
1464 default:
1465 returned_value->keysym = Qdrop0; break;
1466 }
1467 returned_value->modifiers = XEVENT (spec)->event.dnd_drop.modifiers;
1468 break;
1469 }
1470 #endif
1471 default: 1442 default:
1472 signal_error (Qwrong_type_argument, 1443 signal_error (Qwrong_type_argument,
1473 list2 (build_translated_string 1444 list2 (build_translated_string
1474 ("unable to bind this type of event"), 1445 ("unable to bind this type of event"),
1475 spec)); 1446 spec));
1560 EQ (raw_key.keysym, Qbutton2) || EQ (raw_key.keysym, Qbutton2up) || 1531 EQ (raw_key.keysym, Qbutton2) || EQ (raw_key.keysym, Qbutton2up) ||
1561 EQ (raw_key.keysym, Qbutton3) || EQ (raw_key.keysym, Qbutton3up) || 1532 EQ (raw_key.keysym, Qbutton3) || EQ (raw_key.keysym, Qbutton3up) ||
1562 EQ (raw_key.keysym, Qbutton4) || EQ (raw_key.keysym, Qbutton4up) || 1533 EQ (raw_key.keysym, Qbutton4) || EQ (raw_key.keysym, Qbutton4up) ||
1563 EQ (raw_key.keysym, Qbutton5) || EQ (raw_key.keysym, Qbutton5up) || 1534 EQ (raw_key.keysym, Qbutton5) || EQ (raw_key.keysym, Qbutton5up) ||
1564 EQ (raw_key.keysym, Qbutton6) || EQ (raw_key.keysym, Qbutton6up) || 1535 EQ (raw_key.keysym, Qbutton6) || EQ (raw_key.keysym, Qbutton6up) ||
1565 EQ (raw_key.keysym, Qbutton7) || EQ (raw_key.keysym, Qbutton7up) 1536 EQ (raw_key.keysym, Qbutton7) || EQ (raw_key.keysym, Qbutton7up))
1566 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
1567 || EQ (raw_key.keysym, Qdrop0) || EQ (raw_key.keysym, Qdrop1) ||
1568 EQ (raw_key.keysym, Qdrop2) || EQ (raw_key.keysym, Qdrop3) ||
1569 EQ (raw_key.keysym, Qdrop4) || EQ (raw_key.keysym, Qdrop5) ||
1570 EQ (raw_key.keysym, Qdrop6) || EQ (raw_key.keysym, Qdrop7)
1571 #endif
1572 )
1573 error ("Mouse-clicks can't appear in saved keyboard macros."); 1537 error ("Mouse-clicks can't appear in saved keyboard macros.");
1574 1538
1575 XEVENT (event)->channel = Vselected_console; 1539 XEVENT (event)->channel = Vselected_console;
1576 XEVENT (event)->event_type = key_press_event; 1540 XEVENT (event)->event_type = key_press_event;
1577 XEVENT (event)->event.key.keysym = raw_key.keysym; 1541 XEVENT (event)->event.key.keysym = raw_key.keysym;
4294 defsymbol (&Qbutton3up, "button3up"); 4258 defsymbol (&Qbutton3up, "button3up");
4295 defsymbol (&Qbutton4up, "button4up"); 4259 defsymbol (&Qbutton4up, "button4up");
4296 defsymbol (&Qbutton5up, "button5up"); 4260 defsymbol (&Qbutton5up, "button5up");
4297 defsymbol (&Qbutton6up, "button6up"); 4261 defsymbol (&Qbutton6up, "button6up");
4298 defsymbol (&Qbutton7up, "button7up"); 4262 defsymbol (&Qbutton7up, "button7up");
4299 #if defined(HAVE_OFFIX_DND) || defined(HAVE_MS_WINDOWS)
4300 defsymbol (&Qdrop0, "drop0");
4301 defsymbol (&Qdrop1, "drop1");
4302 defsymbol (&Qdrop2, "drop2");
4303 defsymbol (&Qdrop3, "drop3");
4304 defsymbol (&Qdrop4, "drop4");
4305 defsymbol (&Qdrop5, "drop5");
4306 defsymbol (&Qdrop6, "drop6");
4307 defsymbol (&Qdrop7, "drop7");
4308 #endif
4309 defsymbol (&Qmouse_1, "mouse-1"); 4263 defsymbol (&Qmouse_1, "mouse-1");
4310 defsymbol (&Qmouse_2, "mouse-2"); 4264 defsymbol (&Qmouse_2, "mouse-2");
4311 defsymbol (&Qmouse_3, "mouse-3"); 4265 defsymbol (&Qmouse_3, "mouse-3");
4312 defsymbol (&Qmouse_4, "mouse-4"); 4266 defsymbol (&Qmouse_4, "mouse-4");
4313 defsymbol (&Qmouse_5, "mouse-5"); 4267 defsymbol (&Qmouse_5, "mouse-5");