… | |
… | |
867 | #endif |
867 | #endif |
868 | /* nil */ ; |
868 | /* nil */ ; |
869 | } |
869 | } |
870 | } |
870 | } |
871 | |
871 | |
872 | if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_STR_LEN, kbuf, len, DT_END))) |
872 | if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_INT, keysym, DT_STR_LEN, kbuf, len, DT_END))) |
873 | return; |
873 | return; |
874 | |
874 | |
875 | if (len <= 0) |
875 | if (len <= 0) |
876 | return; /* not mapped */ |
876 | return; /* not mapped */ |
877 | |
877 | |
… | |
… | |
987 | |
987 | |
988 | do |
988 | do |
989 | { |
989 | { |
990 | l = &ROW (row++); |
990 | l = &ROW (row++); |
991 | |
991 | |
992 | if (!(l->f & LINE_FILTERED)) |
992 | if (l->f & LINE_FILTERED) |
|
|
993 | row++; |
|
|
994 | else |
993 | { |
995 | { |
994 | // line not filtered, mark it as filtered |
996 | // line not filtered, mark it as filtered |
995 | l->f |= LINE_FILTERED; |
997 | l->f |= LINE_FILTERED; |
996 | while (l->is_longer ()) |
998 | while (l->is_longer ()) |
997 | { |
999 | { |
998 | l = &ROW (row++); |
1000 | l = &ROW (++row); |
999 | l->f |= LINE_FILTERED; |
1001 | l->f |= LINE_FILTERED; |
1000 | } |
1002 | } |
1001 | |
1003 | |
1002 | // and filter it |
1004 | // and filter it |
1003 | HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END)); |
1005 | HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END)); |
… | |
… | |
1327 | |
1329 | |
1328 | break; |
1330 | break; |
1329 | |
1331 | |
1330 | case KeyRelease: |
1332 | case KeyRelease: |
1331 | { |
1333 | { |
1332 | #if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ISO_14755 |
1334 | #if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ISO_14755 || ENABLE_PERL |
1333 | KeySym ks; |
1335 | KeySym keysym; |
1334 | |
1336 | |
1335 | ks = XLookupKeysym (&ev.xkey, ev.xkey.state & ShiftMask ? 1 : 0); // sorry, only shift supported :/ |
1337 | keysym = XLookupKeysym (&ev.xkey, ev.xkey.state & ShiftMask ? 1 : 0); // sorry, only shift supported :/ |
1336 | #endif |
1338 | #endif |
1337 | |
1339 | |
1338 | #if ENABLE_FRILLS || ISO_14755 |
1340 | #if ENABLE_FRILLS || ISO_14755 |
1339 | // ISO 14755 support |
1341 | // ISO 14755 support |
1340 | if (iso14755buf) |
1342 | if (iso14755buf) |
… | |
… | |
1345 | # endif |
1347 | # endif |
1346 | # if ISO_14755 |
1348 | # if ISO_14755 |
1347 | // iso14755 part 5.2 handling: release time |
1349 | // iso14755 part 5.2 handling: release time |
1348 | // first: controls |
1350 | // first: controls |
1349 | if ((ev.xkey.state & ControlMask) |
1351 | if ((ev.xkey.state & ControlMask) |
1350 | && ((ks >= 0x40 && ks <= 0x5f) |
1352 | && ((keysym >= 0x40 && keysym <= 0x5f) |
1351 | || (ks >= 0x61 && ks <= 0x7f))) |
1353 | || (keysym >= 0x61 && keysym <= 0x7f))) |
1352 | { |
1354 | { |
1353 | iso14755buf = ISO_14755_51 | 0x2400 | (ks & 0x1f); |
1355 | iso14755buf = ISO_14755_51 | 0x2400 | (keysym & 0x1f); |
1354 | commit_iso14755 (); |
1356 | commit_iso14755 (); |
1355 | goto skip_switch; |
1357 | goto skip_switch; |
1356 | } |
1358 | } |
1357 | |
1359 | |
1358 | for (unsigned short *i = iso14755_symtab; i[0]; i+= 2) |
1360 | for (unsigned short *i = iso14755_symtab; i[0]; i+= 2) |
1359 | if (i[0] == ks) |
1361 | if (i[0] == keysym) |
1360 | { |
1362 | { |
1361 | iso14755buf = ISO_14755_51 | i[1]; |
1363 | iso14755buf = ISO_14755_51 | i[1]; |
1362 | commit_iso14755 (); |
1364 | commit_iso14755 (); |
1363 | goto skip_switch; |
1365 | goto skip_switch; |
1364 | } |
1366 | } |
… | |
… | |
1388 | iso14755buf = 0; |
1390 | iso14755buf = 0; |
1389 | } |
1391 | } |
1390 | #endif |
1392 | #endif |
1391 | |
1393 | |
1392 | if (ev.xany.window == vt |
1394 | if (ev.xany.window == vt |
1393 | && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_END))) |
1395 | && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_INT, keysym, DT_END))) |
1394 | break; |
1396 | break; |
1395 | |
1397 | |
1396 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
1398 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
1397 | if (!(ev.xkey.state & ControlMask)) |
1399 | if (!(ev.xkey.state & ControlMask)) |
1398 | slip_wheel_ev.stop (); |
1400 | slip_wheel_ev.stop (); |
1399 | else if (ks == XK_Control_L || ks == XK_Control_R) |
1401 | else if (keysym == XK_Control_L || keysym == XK_Control_R) |
1400 | mouse_slip_wheel_speed = 0; |
1402 | mouse_slip_wheel_speed = 0; |
1401 | #endif |
1403 | #endif |
1402 | break; |
1404 | break; |
1403 | } |
1405 | } |
1404 | |
1406 | |
… | |
… | |
4460 | const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT |
4462 | const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT |
4461 | |
4463 | |
4462 | void |
4464 | void |
4463 | rxvt_term::tt_write (const char *data, unsigned int len) |
4465 | rxvt_term::tt_write (const char *data, unsigned int len) |
4464 | { |
4466 | { |
|
|
4467 | if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END))) |
|
|
4468 | return; |
|
|
4469 | |
4465 | if (pty.pty < 0) |
4470 | if (pty.pty < 0) |
4466 | return; |
4471 | return; |
4467 | |
4472 | |
4468 | if (v_buflen == 0) |
4473 | if (v_buflen == 0) |
4469 | { |
4474 | { |