command-line: use external lib to bind keys
misc: simplify selection of DOM