# $EPIC: getcap.txt,v 1.3 2006/12/13 11:07:38 sthalik Exp $
$getcap(TERM <capname> <nametype> <mangle>)
The first argument must be a capability type; currently only “TERM” is supported.
If the <capname> argument is omitted, the empty string is returned.
If the <nametype> argument is omitted, the name type is taken as 0.
If the <mangle> argument is omitted, the mangle value is taken as 1.
This function queries a capability database (currently only TERMinal capabilities are supported) for a given symbol (<capname>), the symbol is of a given type (<nametype>) and returns it.
The return value will be converted from a raw binary format into something that may be passed to /bind if <mangle> is 1.
Values of <nametype>: 0 - <capname> is a full blown terminfo capability name
Values of <mangle>:
Values of <capname>:
If you need to query a terminal capability so you can output it to the screen
via /xecho -r, you could use this function to fetch the capability. You
could fetch a key capability (ie, key_f10) to bind a certain key, but the
/bind command already has a shortcut for that (/bind -symbolic
key_f10). The /bind -symbolic option uses the same underlying feature that
this function does.
$getcap(TERM has_meta_key 0 0) returns 1 if your TERM has a meta key.
The terminal capability (if any) as requested.