Hello,

I'm having some trouble using kbdcontrol to redefine function keys to
strings that include escape sequences.  For example, suppose I want to
redefine "F1" to be equivalent to pressing the left arrow key twice in a
row.  I naiively thought this would work:

    kbdcontrol -f 1 "\033[D\033[D"

However, that just causes the literal string "\033[D\033[D" to be printed
verbatim when I press F1.  I tried a few variations on this theme but was
unsuccessful.

I know the architecture allows what I want because I was able to change the
source code to kbdcontrol to set the default values of the function keys (in
the fkey_table[][] array) to be what I want:

    /* 01-04 */ "\033[D\033[D","\033[N","\033[O","\033[P",

and then cause the values to be defined by running:

    kbdcontrol -F

Clearly, though, that "solution" has no legs.  I know (think?) there's got
to be a way to do this using the standard kbdcontrol utility, and I'm
probably just not escaping my escape sequences properly on the command line,
but I'm just not grokking it.

-
Danny MacMillan

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to