cannot add key map for Ctrl-H on chrome

see demo https://plnkr.co/edit/MgmEJk1QaIEqI9M8R0fF

  	cm.addKeyMap({
  		'Ctrl-h': cm => { cm.execCommand('replace'); },
  	});

but hitting ctrl+h opens a new tab with the browser history.

How can I bind ctrl-h to replace ?

(it is in general possible to capture this key see http://stackoverflow.com/a/34876153/460084)

Chrome won’t let you. The same goes for some other keys, like Ctrl-W.

but it does … see http://stackoverflow.com/a/34876153/460084

Ah, you’re right, and CodeMirror can bind it just fine, you just have to spell it Ctrl-H (note capital H).

works ! great :slight_smile: