I didn't know on input was the same as on text. I thought on input was when you entered text in the edit box and pressed enter. Which wouldn't work for a text command.

The problem with putting k* before kb* is because k* == kb* so kb* would never get triggered. You could put them in the same code.

on *:text:!k*:#:{
if ($1 !ison $chan) msg $nick $2 does not exist.
if ($1 == !kb) mode +b $chan $nick
kick $chan $2
}