[Fix #399] Extract key-chord into a separate module