232key Pro allows you to process the captured data in any way you like by writing your own C# script.

In the script tab, the data captured from your device is available as a string in the "match" variable. Transform it in any way you want and then return it to 232key with a "return" statement.


Captured data is shown in blue in the event log. You can change the regular expression used to match and capture data by clicking on the customize button in the input tab.

This is an experimental early "alpha" release. The functionality is not yet complete and could change significantly in future releases.

Script examples

Output (type) the data exactly as it was captured

return match;

Add line feed (enter) to the captured data

return match+"\n";

Add tab before the captured data and line feed (enter) after it

return "\t"+match+"\n";

Replace comma with period in captured data, add line feed (enter)

match = match=match.Replace(',' , '.');
 return match+"\n";


You can call the following functions from your script to simplify common tasks.

NumberFormatter.Format - formats a string as a number

public static string Format(string capturedString, bool useComma, NumberStyles numberStyles)

This function trims white spaces and removes leading zeros. The decimal separator can be set to a dot or comma.
Example conversion: " -    100000.0 " is returned as "-100000.0" (with useComma set to false).


capturedString String
The string to format as a number (usually data captured from the connected device)

useComma bool
if true, use a comma as the decimal separator. If false, use a point.

numberStyles enum System.Globalization.NumberStyles
NumberStyles to use for formatting (you'll usually want to use NumberStyles.Number)


Formatted string or original string if number conversion fails.


Format captured data as number with a comma as decimal separator and return it to 232key Pro

return NumberFormatter.Format(match, true, NumberStyles.Number);