39 if (event.type == ALLEGRO_EVENT_KEY_CHAR) {
40 if (event.keyboard.unichar >= 32) {
41 al_ustr_append_chr(str, event.keyboard.unichar);
43 }
else if (event.keyboard.keycode == ALLEGRO_KEY_BACKSPACE) {
44 int pos = (int)al_ustr_size(str);
45 if (al_ustr_prev(str, &pos))
46 al_ustr_truncate(str, pos);