Ejemplo n.º 1
0
static void do_shift(unsigned char value, char up_flag)
{
	int old_state = shift_state;

	if (rep)
		return;

	/* Mimic typewriter:
	   a CapsShift key acts like Shift but undoes CapsLock */
	if (value == KVAL(K_CAPSSHIFT)) {
		value = KVAL(K_SHIFT);
		if (!up_flag)
			clr_vc_kbd_led(kbd, VC_CAPSLOCK);
	}

	if (up_flag) {
		/* handle the case that two shift or control
		   keys are depressed simultaneously */
		if (k_down[value])
			k_down[value]--;
	} else
		k_down[value]++;

	if (k_down[value])
		shift_state |= (1 << value);
	else
		shift_state &= ~ (1 << value);

	/* kludge, no joke... */
	if (up_flag && shift_state != old_state && npadch != -1) {
		put_queue(npadch & 0xff);
		npadch = -1;
	}
}
Ejemplo n.º 2
0
void start_tty(struct tty_struct *tty)
{
	if (!tty->stopped)
		return;
	tty->stopped = 0;
	if (tty->link && tty->link->packet) {
		tty->ctrl_status &= ~TIOCPKT_STOP;
		tty->ctrl_status |= TIOCPKT_START;
		wake_up_interruptible(&tty->link->secondary.proc_list);
	}
	if (tty->start)
		(tty->start)(tty);
	TTY_WRITE_FLUSH(tty);
	if (IS_A_CONSOLE(tty->line)) {
		clr_vc_kbd_led(kbd_table + fg_console, VC_SCROLLOCK);
		set_leds();
	}
}