List the sample file /usr/lib/.textswrc to see an example of filters used with a right-handed keyboard. You can copy this file into your home directory, then modify it by adding filter bindings to unused function keys.
Here is the basic format of each .textswrc file entry:
A function is assigned to one of the function keys by including a statement like the following in your .textswrc file:
/* * Note that: * insert_brackets /* */ does NOT work * double quotes are needed */ KEY_TOP(10) FILTER insert_brackets "/* " " */"
This example shows how to include C language comment markers around a piece of text. You could enter this example into your .textswrc file, and save the file. Then, to use this added function, start up a new Text Editor application. Changes to your .textswrc file are only effective when you bring up a new Text Editor. Then select the text and press the key. The text will be replaced with a copy of itself surrounded with "/*" and "*/". Note the C-like syntax of comments in the .textswrc file.
When defining a filter in the .textswrc file, remember that the filter must appear in a directory accessible by your search path. If the command is not found, or if there is some other failure in the invocation of the filter, no change occurs in the document.