getcap
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | getcap [2007/02/02 23:17] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: getcap.txt, | ||
+ | ======Synopsis: | ||
+ | $__getcap__(TERM < | ||
+ | |||
+ | ======Technical: | ||
+ | * The first argument must be a capability type; currently only " | ||
+ | * If the < | ||
+ | * If the < | ||
+ | * If the < | ||
+ | * This function queries a capability database (currently only TERMinal capabilities are supported) for a given symbol (< | ||
+ | * The return value will be converted from a raw binary format into something that may be passed to /bind if < | ||
+ | * Values of < | ||
+ | * 1 - < | ||
+ | * 2 - < | ||
+ | * Values of < | ||
+ | * 0 - The return value should not be modified [dangerous!] | ||
+ | * 1 - Ascii characters 0 <= x < 32 shall be converted into the string " | ||
+ | * Values of < | ||
+ | * See your system' | ||
+ | |||
+ | ======Practical: | ||
+ | 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. | ||
+ | |||
+ | ======Example: | ||
+ | $getcap(TERM has_meta_key 0 0) returns 1 if your TERM has a meta key. | ||
+ | |||
+ | ======Returns: | ||
+ | The terminal capability (if any) as requested. | ||
getcap.txt · Last modified: 2007/02/02 23:17 by 127.0.0.1