Hi,
if I understand correctly, the default filter was set through the dataset settings.
What you currently do is overriding the filter using the setFilter function (function sets the new filter for the dataset).
In your key press event you need to both filter with the category (A, B or C) and the value of the input element using code.