control: fix a segfault in handle_input_char()

On the Nokia N9 MeeGo 1.2 Harmattan phone we've noticed that the
input character becomes -1. This results in a segfault as it gets
converted to 255 but the cfgp_map has only 128 entries. So put the
checks in front of calling this function.