handle edit mode key bindings