Skip to content

Commit

Permalink
support "+," deadkey sequence for adding a cedilla
Browse files Browse the repository at this point in the history
The list of supported diacritical marks is hardcoded, so e.g. #(+' e)
produces "é" but #(+, c) was a syntax error. It now produces "ç".
  • Loading branch information
gelisam committed Oct 5, 2021
1 parent 0eacad7 commit 9b83d98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0)
- Added a `sticky-key`
- Expanded documentation
- Added `--version` (`-V`) flag
- Added `+,` for "add a cedilla"

### [Changed]
- Reorganized codebase
Expand Down
2 changes: 1 addition & 1 deletion keymap/tutorial.kbd
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ ä é © _ _ _ _ _ _ _ _ _ _
_ +' +~ +` +^ _ _ _ _ _ _ _ _
_ +" _ _ _ _ _ _ _ _ _ _
_ +" +, _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _)


Expand Down
2 changes: 1 addition & 1 deletion src/KMonad/Args/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ composeSeqP = do
deadkeySeqP :: Parser [DefButton]
deadkeySeqP = do
_ <- prefix (char '+')
c <- satisfy (`elem` ("~'^`\"" :: String))
c <- satisfy (`elem` ("~'^`\"," :: String))
case runParser buttonP "" (T.singleton c) of
Left _ -> fail "Could not parse deadkey sequence"
Right b -> pure [b]
Expand Down

0 comments on commit 9b83d98

Please sign in to comment.