aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
Commit message (Collapse)AuthorAge
...
* Fix linux config default valueChristian Duerr2018-06-02
|
* Merge branch #1095Christian Duerr2018-06-02
| | | | | | | | | | | | Because there was some overlap with branch #1095, these two PRs have been added together and the config has been restructured to make use of a `scrolling` section. The default faux scrolling amount has also been changed to `3` because this simplifies the code and falls in line with what most other terminal emulators do. There should be no additional test failures due to this.
* Make normal scrolling line amount configurableChristian Duerr2018-06-02
| | | | | | | It is now possible to configure the amount of lines the viewport should scroll when using the normal scrolling mode. This fixes #1160.
* Disable faux scrolling when shift is pressedChristian Duerr2018-06-02
| | | | | | | | | To make it possible to access the native scrollback buffer in the alternate screen without having to disable faux scrolling, faux scrolling is now disabled when the `shift` key is held down. This should allow alacritty to have the best of both worlds, a native scrollback buffer in the alternate screen buffer and faux scrolling.
* Add faux_scrolling back to scrollbackChristian Duerr2018-06-02
|
* Add SCROLL_MULTIPLIERJoe Wilm2018-06-02
| | | | Scroll wheel needs some scaling so it feels like urxvt and friends.
* Scroll to bottom on character receivedJoe Wilm2018-06-02
|
* checkpoint: very basic scrolling worksJoe Wilm2018-06-02
| | | | | | | Things that do not work - Limiting how far back in the buffer it's possible to scroll - Selections (need to transform to buffer offsets)
* Don't paste selection when in mouse modeChristian Duerr2018-05-05
| | | | | | | | | | | | When the mouse mode is set using either 1000h, 1002h or 1003h, the selection should not be pasted when hitting the middle mouse button, because it is job of the application to handle this when mouse mode is enabled. This has been solved by checking for the current mouse modes whenever the `PasteSelection` binding is invoked. This fixes #1215.
* Switch meta key to alt instead of superChristian Duerr2018-03-12
|
* Add modifiers to mouse eventsChristian Duerr2018-03-12
| | | | | | | This commits adds modifiers to the mouse events. It's an attempt at merging https://github.com/jwilm/alacritty/pull/1141 into this branch/PR.
* Fix clippy lintsCelti Burroughs2018-03-12
|
* Rename button_state to prev_state for clarityCelti Burroughs2018-03-12
|
* Extend SGR and VT200 (normal) mouse supportCelti Burroughs2018-03-12
| | | | | | | | | | | | With this commit, Alacritty now reports presses and releases of all three mouse buttons properly, dragging events with all three buttons, and mouse movement events where no button is pressed. It does not report more than three buttons due to inherent limitations of the VT200 and SGR protocol modes. It does not report modifier keys on mouse buttons due to practical considerations. Fixes #714, #506.
* Non-bracketed paste support for DOS CRLFs.Giorgio Gallo2018-01-07
| | | | | | When pasting in non-bracketed more, all line endings (including DOS-style CRLFs) get normalized to a single CR to simulate a keypress of the <return> key.
* Resolves #733.Giorgio Gallo2018-01-07
| | | | When pasting in non-bracketed mode, LFs are replaced with CRs.
* Fix SGR mouse reportingJoe Wilm2018-01-06
| | | | | | | | | | | | | There were two bugs fixed in this commit: 1. `sgr_mouse_report` was not always called when `SGR_MOUSE` bit was set due to calling `normal_mouse_report` instead of `mouse_report` in the scrolling method. 2. SGR reporting was always going off the left mouse button state rather than what was appropriate. This affected SGR scroll reporting since it only behaves correctly for pressed events (final character 'M'). Resolves #698.
* Add clippy check to travisChristian Duerr2018-01-06
| | | | This commit adds clippy as a required step of the build process. To make this possible, all existing clippy issues have been resolved.
* Pass ModifiersState to mouse_moved method tooChristian Duerr2018-01-03
|
* Pass ModifiersState to mouse input as wholeChristian Duerr2018-01-03
| | | | | | ModifiersState is now passed to the mouse methods in `input.rs` as a whole instead of just passing the `shift` state. This should make it a bit easier to do changes in the future.
* Always clear selectionChristian Duerr2018-01-03
| | | | | | | | It seems like the common consensus is that even in mouse mode, the selection should be cleared with a normal click. If there is any reason why this should not be the case, please let me know.
* Use default modifier stateChristian Duerr2018-01-03
| | | | | | The tests were using a manually setup `ModifiersState`, to clean things up a bit the `ModifiersState::default` method has been used to replace this.
* Fix failed testsChristian Duerr2018-01-03
| | | | | Three was still a test which passed the whole modifiers struct instead of just the shift bool, this has been fixed.
* Update mouse modifiers to only pass shiftChristian Duerr2018-01-03
| | | | | | The only mouse modifier required right now is the shift key, to prevent passing around unnecessary state, only the shift state is passed to the mouse processors now.
* Enable shift+select in mouse modeChristian Dürr2018-01-03
| | | | | | | | | | | When an application takes control over the mouse, it usually disables selection completely. However the common way to still make selection possible is by allowing selection while the shift key is held down. This feature is implemented here by making use of the new `modifiers` field on mouse events with glutin/winit. This fixes jwilm/alacritty#146.
* Address feedbackChristian Duerr2018-01-02
| | | | | | | | | The config documentation has been changed to make it clear which part of the documentation is related to which setting. The faux scrollback part of the `scroll_terminal` method has been cleaned up by making use of the fact that the `codepoint + 1` can be used in the escape sequence which is used for scrolling.
* Allow faux scroll amount configurationChristian Dürr2018-01-02
| | | | | It is now possible to configure the amount of lines scrolled with faux scrollback.
* Add config option for faux scrollbackChristian Dürr2018-01-02
| | | | | | | | | | | | | Some people have complained about the behavior of faux scrollback inside of vim/tmux, however from what I can tell, alacritty behaves the same way as other terminal emulators that support faux scrollback. However there are a lot of terminal emulators that do not support faux scrollback at all, which leads to people complaining about unusual scroll behavior. This is my proposal on how to solve this issue, by giving people that do not like the VTE-Style faux scrolling the option to opt-out.
* Fix zombie children (#976)Joe Wilm2017-12-29
| | | Resolves #973
* Update bitflags to v1Chet Gurevitch2017-12-23
|
* Style nitsJoe Wilm2017-12-22
|
* Adapt pixel-based scrolling behaviorChristian Duerr2017-12-22
| | | | | | | | The pixel-based scrolling behavior has been adapted to be as similar to the line-based one as possible. I still have not been able to test this. But this should have a decent chance to at least kinda work.
* Fix faux scrolling for line-based touchpadsChristian Dürr2017-12-22
| | | | | | | | | | Touchpads which use line-based instead of pixel-based updates send partial scroll requests, so decimal numbers are important. The current implementation only really used scroll amounts that are either 1 or -1. This has been fixed and now the line-based touchpads should have very smooth scrolling, but the pixel-based approach is still WIP and completely untested.
* Implement faux scrollingChristian Duerr2017-12-22
| | | | | | | | This patch implements faux scrolling inside the alternate screen buffer. Whenever the user scrolls up or down while the alternate screen buffer is active, instead of actual scrolling three up/down arrow keys are inserted.
* Rewrite err_println to eprintln introduced in Rust 1.19 (#799)Roel2017-10-22
|
* Implement user actions for font resize (#625)Dan Aloni2017-10-14
| | | | | | | | | | | | | | | | | Adds support for font resizing at run-time. Three new actions are introduced: * IncreaseFontSize - Increases current font size by 1.0 * DecreaseFontSize - Decreases current font size by 1.0 * ResetFontSize - Resets font size to that specified in the configuration. The stock config files have example configuration for each which should match gnome-terminal. For convenience, the config entries are: - { key: Key0, mods: Control, action: ResetFontSize } - { key: Equals, mods: Control, action: IncreaseFontSize } - { key: Subtract, mods: Control, action: DecreaseFontSize }
* Use clippy = "*", update, and fix some warnings (#796)Aaron Hill2017-09-27
| | | | | Because there are so many clippy warnings in the current codebase, this commit removes '#![cfg_attr(feature = "clippy", deny(clippy))]', to make it easier to fix warnings incrementally.
* Fix #721: touchpad scrolling (#726)Linus Heckemann2017-09-02
|
* Update to latest Glutin/winit (#671)Joe Wilm2017-07-20
| | | | | | | | | | | * Update to latest Glutin/winit This *finally* gets us off the fork of Glutin we've been on for so long and will unblock a number of other items. Functionality should be the same as before. The update forced our hand on a compiler update. It's no longer feasible to pin on an old version. From now on, we require latest stable.
* Update tests for new Selection APIJoe Wilm2017-06-19
|
* Implement semantic and line selection draggingJoe Wilm2017-06-19
| | | | | | Unlike the regular selection that is by cell, these selection modes highlight either semantic groupings or entire lines while the mouse is dragged.
* Fix selection when padding is presentTuomas Siipola2017-06-06
|
* Implement FocusIn/FocusOut reports (#589)Aaron Hill2017-05-29
| | | | Implements sending FocusIn/FocusOut events, as defined at http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-FocusIn_FocusOut
* Add support for running commands on key press (#566)Dominik Miedziński2017-05-25
| | | | | | | | | | | | | | | | | Based on option `command` in key binding section in config, e.g. - { key: N, mods: Control|Shift, command: alacritty } # or - { key: N, mods: Control|Shift, command: { program: "alacritty", args: ["-e", "vttest"], }} specified command will be run in the background on key press. Alacritty doesn't wait for its result nor block IO.
* Add window padding optionTuomas Siipola2017-05-06
| | | | | | | | | | | Padding can be configured by using the `padding` field in the config file, like so: padding: x: 2 y: 2 which would result in a 2px padding within each side of the window.
* Semantic SelectionXiaoyu Yin2017-02-07
| | | | | | | | | | | | | | | | | | | | | Fix tests and add line select Refactor BidirectionalIter to remove if blocks Allow for cells tagged with WRAPLINE to continue expanding the selection Reorganize config into structs Add test coverage that callbacks are called Cleanup mouse config - Uses Duration type for ClickHandler::threshold - Removes `action` property from ClickHandler--this can be added in a backwards compatible way later on - Renames ClickState::DblClick to DoubleClick fixup! Cleanup mouse config
* Send mouse wheel commands only if they're supportedTuomas Siipola2017-02-06
| | | | Fixes #48
* Add "Quit" action to allow exit on a Cmd-W or Cmd-QBrandur2017-02-05
| | | | | | | | | | | | | | | | | | | | | | Adds a new "Quit" action and binds it to Cmd-W and Cmd-Q on Mac OS in an attempt to make Alacritty feel more like a "normal" citizen of the operating system. Alternatives like Ctrl-D are okay, but I usually want to leave my shells nested within Tmux open even if I exit my terminal. It's also largely selfish: I've built up muscle memory over the years that takes my fingers to Cmd-Q first (and I suspect I'm not the only one). The implementation for an exit is copied from `event.rs` which notably is already tagged with a FIXME. It seems that `tty.rs` contains a `process_should_exit` system to help handle a `SIGCHLD`, and it's possible that these two exit implementations should be merged together. I could probably tackle that as my next project. As mentioned in #218, Alacritty can't really spawn other windows right now, so I've tied in Cmd-W as simply another synonym for quitting until that's implemented. Fixes #218.
* Decouple input processing from TermJoe Wilm2017-02-02
| | | | Should make input processing much more easily tested.
* Load the primary clipboard when pastingjc00ke2017-01-30
| | | | | Paste & PasteSelection are not quite the same. The former should be pulling from the main clipboard where the latter does not.