Index: sys/dev/kbd/kbd.c
===================================================================
--- sys/dev/kbd/kbd.c (revision 305452)
+++ sys/dev/kbd/kbd.c (working copy)
@@ -1247,11 +1247,17 @@
i += ALTGR_OFFSET;
key = &kbd->kb_keymap->key[i];
i = ((state & SHIFTS) ? 1 : 0)
- | ((state & CTLS) ? 2 : 0)
- | ((state & ALTS) ? 4 : 0);
- if (((key->flgs & FLAG_LOCK_C) && (state & CLKED))
- || ((key->flgs & FLAG_LOCK_N) && (state & NLKED)) )
+ | ((state & CTLS) ? 2 : 0);
+ if ((key->flgs & FLAG_LOCK_C) && (state & CLKED))
i ^= 1;
+ if ((key->flgs & FLAG_LOCK_N) &&
+ !( ((key->spcl & (0x80 >> i)) && (key->map[i] == RBT)) ||
+ ((key->spcl & (0x80 >> (i | 4))) && (key->map[i | 4] == RBT)) )) {
+
+ i |= (state & NLKED) ? 4 : 0;
+ } else {
+ i |= (state & ALTS) ? 4 : 0;
+ }
if (up) { /* break: key released */
action = kbd->kb_lastact[keycode];
Index: sys/dev/vt/colors/vt_termcolors.c
===================================================================
--- sys/dev/vt/colors/vt_termcolors.c (revision 305452)
+++ sys/dev/vt/colors/vt_termcolors.c (working copy)
@@ -40,21 +40,21 @@
unsigned char b; /* Blue percentage value. */
} color_def[16] = {
{0, 0, 0}, /* black */
- {50, 0, 0}, /* dark red */
- {0, 50, 0}, /* dark green */
- {77, 63, 0}, /* dark yellow */
- {20, 40, 64}, /* dark blue */
- {50, 0, 50}, /* dark magenta */
- {0, 50, 50}, /* dark cyan */
- {75, 75, 75}, /* light gray */
+ {67, 0, 0}, /* dark red */
+ {0, 67, 0}, /* dark green */
+ {67, 67, 0}, /* dark yellow */
+ {0, 0, 67}, /* dark blue */
+ {67, 0, 67}, /* dark magenta */
+ {0, 67, 67}, /* dark cyan */
+ {67, 67, 67}, /* light gray */
- {18, 20, 21}, /* dark gray */
- {100, 0, 0}, /* light red */
- {0, 100, 0}, /* light green */
- {100, 100, 0}, /* light yellow */
- {45, 62, 81}, /* light blue */
- {100, 0, 100}, /* light magenta */
- {0, 100, 100}, /* light cyan */
+ {33, 33, 33}, /* dark gray */
+ {100, 33, 33}, /* light red */
+ {33, 100, 33}, /* light green */
+ {100, 100, 33}, /* light yellow */
+ {33, 33, 100}, /* light blue */
+ {100, 33, 100}, /* light magenta */
+ {33, 100, 100}, /* light cyan */
{100, 100, 100}, /* white */
};
Index: sys/dev/vt/vt_core.c
===================================================================
--- sys/dev/vt/vt_core.c (revision 305452)
+++ sys/dev/vt/vt_core.c (working copy)
@@ -773,6 +773,9 @@
static int
vt_processkey(keyboard_t *kbd, struct vt_device *vd, int c)
{
+ size_t len;
+ const u_char *cp;
+
struct vt_window *vw = vd->vd_curwindow;
random_harvest_queue(&c, sizeof(c), 1, RANDOM_KEYBOARD);
@@ -887,6 +890,13 @@
case FKEY | F(61): /* Delete key. */
terminal_input_special(vw->vw_terminal, TKEY_DELETE);
break;
+ default:
+ if (KEYFLAGS(c) == FKEY) {
+ cp = kbdd_get_fkeystr(kbd, KEYCHAR(c), &len);
+ if (cp != NULL) {
+ terminal_input_raw_string(vw->vw_terminal, cp, len);
+ }
+ }
}
} else if (KEYFLAGS(c) == 0) {
/* Don't do UTF-8 conversion when doing raw mode. */
Index: sys/kern/subr_terminal.c
===================================================================
--- sys/kern/subr_terminal.c (revision 305452)
+++ sys/kern/subr_terminal.c (working copy)
@@ -317,6 +317,21 @@
}
void
+terminal_input_raw_string(struct terminal *tm, const u_char *cp, size_t len)
+{
+ struct tty *tp;
+
+ tp = tm->tm_tty;
+ if (tp == NULL)
+ return;
+
+ tty_lock(tp);
+ ttydisc_rint_simple(tp, cp, len);
+ ttydisc_rint_done(tp);
+ tty_unlock(tp);
+}
+
+void
terminal_input_special(struct terminal *tm, unsigned int k)
{
struct tty *tp;
Index: sys/sys/terminal.h
===================================================================
--- sys/sys/terminal.h (revision 305452)
+++ sys/sys/terminal.h (working copy)
@@ -214,6 +214,7 @@
void terminal_mute(struct terminal *tm, int yes);
void terminal_input_char(struct terminal *tm, term_char_t c);
void terminal_input_raw(struct terminal *tm, char c);
+void terminal_input_raw_string(struct terminal *tm, const u_char *cp, size_t len);
void terminal_input_special(struct terminal *tm, unsigned int k);
void termcn_cnregister(struct terminal *tm);
Index: usr.sbin/kbdcontrol/kbdcontrol.c
===================================================================
--- usr.sbin/kbdcontrol/kbdcontrol.c (revision 305452)
+++ usr.sbin/kbdcontrol/kbdcontrol.c (working copy)
@@ -79,30 +79,30 @@
};
static const char fkey_table[96][MAXFK] = {
-/* 01-04 */ "\033[M", "\033[N", "\033[O", "\033[P",
-/* 05-08 */ "\033[Q", "\033[R", "\033[S", "\033[T",
-/* 09-12 */ "\033[U", "\033[V", "\033[W", "\033[X",
-/* 13-16 */ "\033[Y", "\033[Z", "\033[a", "\033[b",
-/* 17-20 */ "\033[c", "\033[d", "\033[e", "\033[f",
-/* 21-24 */ "\033[g", "\033[h", "\033[i", "\033[j",
-/* 25-28 */ "\033[k", "\033[l", "\033[m", "\033[n",
-/* 29-32 */ "\033[o", "\033[p", "\033[q", "\033[r",
-/* 33-36 */ "\033[s", "\033[t", "\033[u", "\033[v",
-/* 37-40 */ "\033[w", "\033[x", "\033[y", "\033[z",
-/* 41-44 */ "\033[@", "\033[[", "\033[\\","\033[]",
-/* 45-48 */ "\033[^", "\033[_", "\033[`", "\033[{",
-/* 49-52 */ "\033[H", "\033[A", "\033[I", "-" ,
-/* 53-56 */ "\033[D", "\033[E", "\033[C", "+" ,
-/* 57-60 */ "\033[F", "\033[B", "\033[G", "\033[L",
-/* 61-64 */ "\177", "\033[J", "\033[~", "\033[}",
-/* 65-68 */ "" , "" , "" , "" ,
-/* 69-72 */ "" , "" , "" , "" ,
-/* 73-76 */ "" , "" , "" , "" ,
-/* 77-80 */ "" , "" , "" , "" ,
-/* 81-84 */ "" , "" , "" , "" ,
-/* 85-88 */ "" , "" , "" , "" ,
-/* 89-92 */ "" , "" , "" , "" ,
-/* 93-96 */ "" , "" , "" , "" ,
+/* 01-04 */ "\033OP" , "\033OQ" , "\033OR" , "\033OS" ,
+/* 05-08 */ "\033[15~" , "\033[17~" , "\033[18~" , "\033[19~" ,
+/* 09-12 */ "\033[20~" , "\033[21~" , "\033[23~" , "\033[24~" ,
+/* 13-16 */ "\033[Y" , "\033[Z" , "\033[a" , "\033[b" ,
+/* 17-20 */ "\033[c" , "\033[d" , "\033[e" , "\033[f" ,
+/* 21-24 */ "\033[g" , "\033[h" , "\033[i" , "\033[j" ,
+/* 25-28 */ "\033[k" , "\033[l" , "\033[m" , "\033[n" ,
+/* 29-32 */ "\033[o" , "\033[p" , "\033[q" , "\033[r" ,
+/* 33-36 */ "\033[s" , "\033[t" , "\033[u" , "\033[v" ,
+/* 37-40 */ "\033[w" , "\033[x" , "\033[y" , "\033[z" ,
+/* 41-44 */ "\033[@" , "\033[[" , "\033[\\" , "\033[]" ,
+/* 45-48 */ "\033[^" , "\033[_" , "\033[`" , "\033[{" ,
+/* 49-52 */ "\033[H" , "\033[A" , "\033[5~" , "-" ,
+/* 53-56 */ "\033[D" , "\033[E" , "\033[C" , "+" ,
+/* 57-60 */ "\033[F" , "\033[B" , "\033[6~" , "\033[2~" ,
+/* 61-64 */ "\0333~" , "\033[J" , "\033[~" , "\033[}" ,
+/* 65-68 */ "\033[1;2H", "\033[1;2A", "\033[5;2~", "\033[1;2D",
+/* 69-72 */ "\033[1;2C", "\033[1;2F", "\033[1;2B", "\033[6;2~",
+/* 73-76 */ "\033[2;2~", "\033[3;2~", "\033[1;5H", "\033[1;5A",
+/* 77-80 */ "\033[5;5~", "\033[1;5D", "\033[1;5C", "\033[1;5F",
+/* 81-84 */ "\033[1;5B", "\033[6;5~", "\033[2;5~", "\033[3;5~",
+/* 85-88 */ "" , "" , "" , "" ,
+/* 89-92 */ "" , "" , "" , "" ,
+/* 93-96 */ "" , "\033\n" , "\033/" , "\033?" ,
};
static const int delays[] = {250, 500, 750, 1000};
[/i][/i]