This splits the String() method into two methods:
- String() returns the text representation of the key and falls back to
Keystroke() if there is no text representation
- Keystroke() returns the keystroke representation of the key
Needs: https://github.com/charmbracelet/x/pull/439
This was probably a typo since the `w` gets set again during
`detectOneMsg` it wouldn't make sense to initially set it to `07` and it
makes the code confusing.
Fixes: a154847611 (feat: extended Coordinates mouse reporting & additional buttons support (#594))
This adds support to the Windows Console Input Buffer API which access
the console API directly without the need for virtual terminal input
(i.e. the current mode that emulates unix inputs).
Since this uses the console input api, we can finally read window size
events.
This is mearly based on the awesome work of @erikgeiser in #140.
Fixes: https://github.com/charmbracelet/bubbletea/issues/538
Fixes: https://github.com/charmbracelet/bubbletea/issues/121
* feat: bracketed paste
This introduces support for input via bracketed paste, where escape
characters in the pasted input are not interpreted.
Pasted input are marked as a special field in the KeyMsg. This is
useful because pasted input may need sanitation in individual widgets.
* fix(key): support bracketed paste with short reads
Some terminal emulators feed the bracketed paste data in multiple
chunks, which may not be aligned on a 256 byte boundary. So it's
possible for `input.Read` to return less than 256 bytes read
but while there's still more data to be read to complete a bracketed
paste input.
---------
Co-authored-by: Christian Muehlhaeuser <muesli@gmail.com>
* convert locale string to utf-8 on Windows
* update go.mod
* revert go fmt ./...
* fix(lint): use tabs in GoDoc example code
Co-authored-by: Christian Rocha <christian@rocha.is>
* feat(keys): add support for shift/ctrl+arrow keys
* chore(keys): use sequences for shift/ctrl arrow keys
* feat(keys): support ctrl+shift+arrow keys
* chore(keys): use sequences for alt+arrows
* feat(keys): add support for arrow key combinations with alt modifiers
* fix(keys): remove an extreaneous check
* feat(keys): add support for urxvt arrow keys with modfiers
* feat(keys): add support for arrow keys in DECCKM mode
* docs(keys): expand on comment about ctrl+backtick
* chore(keys): migrate various bindings to sequences
* Minor comment improvements to the input parser
Co-authored-by: Bwahharharrr <yitang@tutanota.com>
* fix: replace keySP with working KeySpace
* test: update test to meet new reqs
* fix: fix test looking for 'space'
* fix(keys): set type to KeySpace when sending a space
* docs(keys): comments
Co-authored-by: Christian Rocha <christian@rocha.is>