BDI: key down event + refactor