Lines Matching +full:short +full:- +full:press +full:- +full:ms

2  * Copyright (C) 1984-2025  Mark Nudelman
13 * Uses termcap to be as terminal-independent as possible.
125 static unsigned short *whitescreen;
191 public int vt_enabled = -1; /* Is virtual terminal processing available? */
225 *sc_deinit; /* Exit terminal de-initialization */
227 static int attrcolor = -1;
236 public int kill_char; /* The user's line-kill char */
237 public int werase_char; /* The user's word-erase char */
252 static int termcap_debug = -1;
269 extern short ospeed; /* Terminal output baud rate */
273 short ospeed;
312 s->c_lflag &= ~(0 in set_termio_flags()
330 s->c_oflag |= (0 in set_termio_flags()
339 s->c_oflag &= ~(0 in set_termio_flags()
363 * 5. Signal-causing characters such as ctrl-C (interrupt),
673 /* MS-DOS, Windows, or OS2 */ in raw_mode()
716 for (p = envs; p != NULL; p = p->next) in ltget_env()
717 if (strcmp(p->name, capname) == 0) in ltget_env()
718 return p->value; in ltget_env()
720 p->name = save(capname); in ltget_env()
721 p->value = (char *) ecalloc(strlen(capname)+3, sizeof(char)); in ltget_env()
722 sprintf(p->value, "<%s>", capname); in ltget_env()
723 p->next = envs; in ltget_env()
725 return p->value; in ltget_env()
749 return (-1); in ltgetnum()
811 sys_height = scr.srWindow.Bottom - scr.srWindow.Top + 1; in scrsize()
812 sys_width = scr.srWindow.Right - scr.srWindow.Left + 1; in scrsize()
955 while (msec-- > 0) in delay()
1294 * The user can turn it back on with -g, in get_term()
1301 * Get various string-valued capabilities. in get_term()
1368 * We need it only if we don't have home or lower-left. in get_term()
1421 strcpy(sp, tgoto(sc_move, 0, sc_height-1)); in get_term()
1463 shell_lines = sc_height - 1; in get_term()
1537 * terminal-specific screen manipulation.
1550 cpos.X = csbi.srWindow.Left + (col - 1); in _settextposition()
1551 cpos.Y = csbi.srWindow.Top + (row - 1); in _settextposition()
1599 /* don't care about the initial mode, and win VT hard-enables am+xn */ in win32_init_vt_term()
1617 * Termcap-like init with a private win32 console.
1644 // no disabled auto-return). in win32_init_term()
1649 size.X = scr.srWindow.Right - scr.srWindow.Left + 1; in win32_init_term()
1650 size.Y = scr.srWindow.Bottom - scr.srWindow.Top + 1; in win32_init_term()
1794 * but with saved scrolled-off-the-top lines. This way, in init()
1916 movetext(1,1, sc_width,sc_height-1, 1,2); in add_line()
1937 rcSrc.Bottom--; in add_line()
1960 * into the scrollback buffer when we go down-one-line (in WIN32).
1970 if (n >= sc_height - 1)
1981 /* Get the extent of all-visible-rows-but-the-last. */
1995 new_org.Y = rcSrc.Top - n;
2005 goto_line(sc_height - n - 1);
2031 winsz = csbi.dwSize.X * (csbi.srWindow.Bottom - csbi.srWindow.Top + 1); in win32_clear()
2057 if (n >= sc_height - 1) in win32_scroll_up()
2091 topleft.Y = rcSrc.Bottom - n; in win32_scroll_up()
2092 size = (n * csbi.dwSize.X) + (rcSrc.Right - topleft.X); in win32_scroll_up()
2100 csbi.dwCursorPosition.Y -= n; in win32_scroll_up()
2135 row = scr.dwCursorPosition.Y - scr.srWindow.Top + 1; in line_left()
2167 size.Y = scr.srWindow.Bottom - scr.srWindow.Top + 1; in check_winch()
2168 size.X = scr.srWindow.Right - scr.srWindow.Left + 1; in check_winch()
2223 for (row = w.numtextrows; row > 0; row--) in create_flash()
2234 whitescreen = (unsigned short *) in create_flash()
2235 malloc(sc_width * sc_height * sizeof(short)); in create_flash()
2275 unsigned short *currscreen; in vbell()
2286 currscreen = (unsigned short *) in vbell()
2287 malloc(sc_width * sc_height * sizeof(short)); in vbell()
2367 short top, left; in clear_eol()
2368 short bot, right; in clear_eol()
2406 scr.dwSize.X - cpos.X, cpos, &nchars); in clear_eol()
2408 scr.dwSize.X - cpos.X, cpos, &nchars); in clear_eol()
2417 * Clear the screen if there's off-screen memory below the display.
2439 * If we're in a non-normal attribute mode, temporarily exit in clear_bot()
2480 * Color string may be "x[y]" where x and y are 4-bit color chars,
2482 * Any of x,y,N,M may also be "-" to mean "unchanged".
2486 * Parse a 4-bit color char.
2508 case '-': return CV_NOCHANGE; in parse_color4()
2518 if (**ps == '-') in parse_color6()
2663 tput_fmt(ESCS"[m", -1, f_putc); in tput_color()
2897 row = scr.dwCursorPosition.Y - scr.srWindow.Top + 1; in putbs()
2898 col = scr.dwCursorPosition.X - scr.srWindow.Left + 1; in putbs()
2905 _settextposition(row, col-1); in putbs()
2944 wch->wc_ch = ch; in win32_enqueue()
2945 wch->wc_next = NULL; in win32_enqueue()
2951 for (pch = win32_queue; pch->wc_next != NULL; pch = pch->wc_next) in win32_enqueue()
2953 pch->wc_next = wch; in win32_enqueue()
2964 wch->wc_ch = ch; in WIN32ungetch()
2965 wch->wc_next = win32_queue; in WIN32ungetch()
2975 char ch = wch->wc_ch; in win32_get_queue()
2976 win32_queue = wch->wc_next; in win32_get_queue()
2988 if (!mousecap || xip->ir.EventType != MOUSE_EVENT) in win32_mouse_event()
2992 /* TODO: switch to the 1006 protocol to allow specific-button-up reports */ in win32_mouse_event()
2993 switch (xip->ir.Event.MouseEvent.dwEventFlags) in win32_mouse_event()
2995 case 0: /* press or release */ in win32_mouse_event()
2996 if (xip->ir.Event.MouseEvent.dwButtonState == 0) in win32_mouse_event()
2998 else if (xip->ir.Event.MouseEvent.dwButtonState == 1) /* leftmost */ in win32_mouse_event()
3000 else if (xip->ir.Event.MouseEvent.dwButtonState == 2) /* rightmost */ in win32_mouse_event()
3002 else if (xip->ir.Event.MouseEvent.dwButtonState == 4) /* middle ("next-to-leftmost") */ in win32_mouse_event()
3008 …b = X11MOUSE_OFFSET + (((int)xip->ir.Event.MouseEvent.dwButtonState < 0) ? X11MOUSE_WHEEL_DOWN : X… in win32_mouse_event()
3011 if (xip->ir.Event.MouseEvent.dwButtonState != 1) in win32_mouse_event()
3024 win32_enqueue(X11MOUSE_OFFSET + xip->ir.Event.MouseEvent.dwMousePosition.X + 1); in win32_mouse_event()
3025 win32_enqueue(X11MOUSE_OFFSET + xip->ir.Event.MouseEvent.dwMousePosition.Y + 1); in win32_mouse_event()
3047 * Get an input char from an INPUT_RECORD and store in xip->ichar.
3052 LWCHAR ch = xip->ir.Event.KeyEvent.uChar.UnicodeChar; in win32_get_ichar()
3053 xip->ichar = ch; in win32_get_ichar()
3056 int is_down = xip->ir.Event.KeyEvent.bKeyDown; in win32_get_ichar()
3062 xip->ir.Event.KeyEvent.bKeyDown = 1; in win32_get_ichar()
3069 hi_surr = 0x10000 + ((ch - 0xD800) << 10); in win32_get_ichar()
3073 xip->ichar = hi_surr + (ch - 0xDC00); in win32_get_ichar()
3081 * Handle a scan code (non-ASCII) key input.
3085 int scan = -1; in win32_scan_code()
3086 if (xip->ir.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) in win32_scan_code()
3088 switch (xip->ir.Event.KeyEvent.wVirtualScanCode) in win32_scan_code()
3100 } else if (xip->ir.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED) in win32_scan_code()
3102 if (xip->ichar == '\t') in win32_scan_code()
3105 if (scan < 0 && xip->ichar == 0) in win32_scan_code()
3106 scan = xip->ir.Event.KeyEvent.wVirtualScanCode; in win32_scan_code()
3127 if (xip->ir.EventType != KEY_EVENT || in win32_key_event()
3128 …((xip->ir.Event.KeyEvent.dwControlKeyState & (RIGHT_ALT_PRESSED|LEFT_CTRL_PRESSED)) == (RIGHT_ALT_… in win32_key_event()
3129 … (xip->ir.Event.KeyEvent.wVirtualScanCode == 0 && xip->ir.Event.KeyEvent.uChar.UnicodeChar == 0) || in win32_key_event()
3130 xip->ir.Event.KeyEvent.wVirtualScanCode == PCK_CAPS_LOCK || in win32_key_event()
3131 xip->ir.Event.KeyEvent.wVirtualScanCode == PCK_NUM_LOCK || in win32_key_event()
3132 …(xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_MENU && xip->ir.Event.KeyEvent.uChar.UnicodeChar == … in win32_key_event()
3133 xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_KANJI || in win32_key_event()
3134 xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_SHIFT || in win32_key_event()
3135 xip->ir.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL) in win32_key_event()
3140 if (!xip->ir.Event.KeyEvent.bKeyDown) in win32_key_event()
3146 repeat = xip->ir.Event.KeyEvent.wRepeatCount; in win32_key_event()
3150 put_wchar(&up, xip->ichar); in win32_key_event()
3151 for (; repeat > 0; --repeat) in win32_key_event()
3236 * We've got UTF-8 text in a non-UTF-8 console. Convert it to in WIN32textout()
3240 * "static" wtext is not a state - only avoid 16K on stack. in WIN32textout()
3250 len = sizeof(buf) - 1; in WIN32textout()