diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cd987e..e434228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/). -## Unreleased +## [Unreleased] -## 0.1.0.0 - YYYY-MM-DD +### Added + +- added Emacs-style keybindings for cursor movement diff --git a/README.md b/README.md index ef3ade4..e665a05 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,8 @@ effects: ### Edit Mode - ESC: Return to display mode. -- Up/K: Move the cursor up. -- Down/J: Move the cursor down. -- Left/H: Move the cursor left. -- Right/L: Move the cursor right. +- Up/K/CTRL-P: Move the cursor up. +- Down/J/CTRL-N: Move the cursor down. +- Left/H/CTRL-B: Move the cursor left. +- Right/L/CTRL-F: Move the cursor right. - F: Flip the bit under the cursor (1 becomes 0; 0 becomes 1). diff --git a/src/Hamming/App/Events.hs b/src/Hamming/App/Events.hs index f665c25..66226df 100644 --- a/src/Hamming/App/Events.hs +++ b/src/Hamming/App/Events.hs @@ -150,21 +150,25 @@ keyBindingsFor m = coreBindings ++ case m of , ( UpEvent , [ bind KUp , bind 'k' + , ctrl 'p' ] ) , ( DownEvent , [ bind KDown , bind 'j' + , ctrl 'n' ] ) , ( LeftEvent , [ bind KLeft , bind 'h' + , ctrl 'b' ] ) , ( RightEvent , [ bind KRight , bind 'l' + , ctrl 'f' ] ) , ( FlipBitEvent