aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/input.rs
Commit message (Collapse)AuthorAge
* Fix cursor reports with mouse outside of windowChristian Duerr2020-12-13
| | | | | | | | | | | Previously Alacritty would not report cursor escapes to the application when a mouse button was held down and the mouse was moved. This prevents applications like tmux from updating their selection. Similarly to how windowing libraries keep reporting mouse events when the left mouse button is held down over the window, the escape sequences are now clamped to within the grid and reported to applications. Fixes #4566.
* Add blinking cursor supportDettorer2020-11-23
| | | | | | | | This adds support for blinking the terminal cursor. This can be controlled either using the configuration file, or using escape sequences. The supported control sequences for changing the blinking state are `CSI Ps SP q` and private mode 12.
* Add ability to select text during searchChristian Duerr2020-11-13
| | | | | | | | | | | | | This removes the restriction of not being able to select text while the search is active, making it a bit less jarring of a UX when the user tries to interact with the terminal during search. Since the selection was used during vi-less search to highlight the focused match, there is now an option for a focused match color, which uses the inverted normal match color by default. This focused match is used for both search modes. Other mouse interactions are now also possible during search, like opening URLs or clicking inside of mouse mode applications.
* Add support for single line terminalsii412020-09-27
| | | | | | | | | | | | | | | | | This changes the minimum terminal dimensions from 2 lines and 2 columns, to 1 line and 2 columns. This also reworks the `SizeInfo` to store the number of columns and lines and consistently has only the terminal lines/columns stored, instead of including the message bar and search in some places of the Alacritty renderer/input. These new changes also make it easy to properly start the selection scrolling as soon as the mouse is over the message bar, instead of waiting until it is beyond it. Fixes #4207. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Add escape to report text area sizeAyose Cazorla2020-08-28
| | | | This implements the escapes `CSI 14 t` and `CSI 18 t` which report the text area size in pixels and characters.
* Unify term dimension callsChristian Duerr2020-08-25
| | | | | | | Since the `Term` implements the `Dimensions` trait itself, we shouldn't call `term.grid()` to call methods from the `Dimensions` trait. This removes all instances of this that I could find in the code at the moment.
* Fix selection scrolling with message bar visibleChristian Duerr2020-08-14
| | | | | | | This resolves an issue with selection scrolling which would cause the selection to wrap to the top of the screen once the cursor enters the padding below the message bar. Fixes #4120.
* Fix characters swallowed during searchChristian Duerr2020-08-09
| | | | This resolves a bug where characters get swallowed when pressing them after pressing backspace before the backspace key is released.
* Add ^C binding to cancel search and leave Vi modeChristian Duerr2020-08-10
| | | | Fixes #4089.
* Fix scrolling with selection expansionChristian Duerr2020-07-27
| | | Fixes #4040.
* Add support for searching without vi modeChristian Duerr2020-07-15
| | | | | | | | This implements search without vi mode by using the selection to track the active search match and advancing it on user input. The keys to go to the next or previous match are not configurable and are bound to enter and shift enter based on Firefox's behavior. Fixes #3937.
* Fix movement within search matchesChristian Duerr2020-07-14
| | | | | | | | | | | | | | | | | Previously the SearchEndNext and SearchEndPrevious match acted exactly like the SearchNext and SearchPrevious action, however this is not how vim works. In vim, regardless of direction the `gN` action always jumps to the next match start to the left of the cursor, while the `gn` action always jumps to the next search end to the right of the cursor. While both approaches might seem reasonable at first, vim's approach has a significant advantage w.r.t. predictability and automation of the movement. By always knowing which direction the motion goes to, this allows for mappings that reliably navigate inside the current match regardless of the global search direction. So deleting until the end of the match would always be `dgn` for example, regardless in which direction the user has jumped to it. Fixes #3953.
* Remove gui dependencies from alacritty_terminalKirill Chibisov2020-07-11
| | | | | | | | This commit removes font dependency from alacritty_terminal, so it'll simplify the usage of alacritty_terminal as a library, since you won't link to system's libraries anymore. It also moves many alacritty related config options from it. Fixes #3393.
* Add readline bindings to searchChristian Duerr2020-07-10
| | | Fixes #3938.
* Add option to run command on bell Kirill Chibisov2020-07-10
| | | Fixes #1528.
* Add regex scrollback buffer searchChristian Duerr2020-07-09
| | | | | | | | | | This adds a new regex search which allows searching the entire scrollback and jumping between matches using the vi mode. All visible matches should be highlighted unless their lines are excessively long. This should help with performance since highlighting is done during render time. Fixes #1017.
* Fix live right-click expansionChristian Duerr2020-06-24
| | | | | | | | While the commit 43c0ad6ea9d2467ccf867a310c4f1e30f5b627c6 introduced right click as a way to expand the active selection, it did not allow for holding right click to continuously do so. This commit remedies that problem by allowing live expansion with while holding the right mouse button.
* Add selection expansionChristian Duerr2020-06-23
| | | | | | | This allows for expanding the selection using the right mouse button. The new selection type depends on the number of clicks and applies to both sides of the selection. Fixes #1554.
* Add automatic scrolling during selectionChristian Duerr2020-06-18
| | | | | | | | | | | | | This adds a new `Scheduler` which allows for staging events to be processed at a later time. If there is a selection active and the mouse is above or below the window, the viewport will now scroll torwards the direction of the mouse. The amount of lines scrolled depends on the distance of the mouse to the boundaries used for selection scrolling. To make it possible to scroll while in fullscreen, the selection scrolling area includes the padding of the window and is at least 5 pixels high in case there is not enough padding present.
* Remove copypasta dependency from alacritty_terminalKirill Chibisov2020-06-07
|
* Remove copyright notice from filesChristian Duerr2020-06-06
| | | | | | | | | | | | | | Keeping the license as part of every file bloats up the files unnecessarily and introduces an additional overhead to the creation of new modules. Since cargo already provides excellent dependency management, most of the code-reuse of Alacritty should occur through Rust's dependency management instead of copying it source. If code is copied partially, copying the license from the main license file should be just as easy as copying from the top of the file and making some adjustments based on where it is used is likely necessary anyways.
* Refactor Shell, Command, and Launcher to share implKirill Chibisov2020-06-05
|
* Refactor Term/Grid separationChristian Duerr2020-05-30
| | | | | | | | | | | This commit aims to clear up the separation between Term and Grid to make way for implementing search. The `cursor` and `cursor_save` have been moved to the grid, since they're always bound to their specific grid and this makes updating easier. Since the selection is independent of the active grid, it has been moved to the `Term`.
* Fix vi ScrollToBottom motionChristian Duerr2020-05-16
| | | | | This resolves an issue with the ScrollToBottom motion in vi mode where it would jump between the first unoccupied cell across wrapped lines and the first unoccupied cell in the current line.
* Don't hide cursor on modifier pressDavid Herberth2020-05-06
| | | Fixes #2761.
* Extend style guideline documentationChristian Duerr2020-05-05
|
* Fix various mouse mode + vi mode interactionsKirill Chibisov2020-04-10
| | | | | | | | | This commit fixes some issues introduced by 1a8cd172e520e493bacc9c6a2ae6f80de086eaa3: 1. Vi cursor not moving properly on double/triple click 2. URL not launching via mouse click in vi mode + mouse mode 3. Ability to select in mouse mode with double/triple click regardless of shift modifier
* Add CopyPrimary keybinding action on Linux/BSDKirill Chibisov2020-03-23
|
* Remove right click deselectionStefan Devai2020-03-19
| | | Fixes #3144.
* Fix scrolling with selection outside of vimodeChristian Duerr2020-03-19
|
* Add modal keyboard motion modeChristian Duerr2020-03-18
| | | | | | | | | | | | | | | | | | | This implements a basic mode for navigating inside of Alacritty's history with keyboard bindings. They're bound by default to vi's motion shortcuts but are fully customizable. Since this relies on key bindings only single key bindings are currently supported (so no `ge`, or repetition). Other than navigating the history and moving the viewport, this mode should enable making use of all available selection modes to copy content to the clipboard and launch URLs below the cursor. This also changes the rendering of the block cursor at the side of selections, since previously it could be inverted to be completely invisible. Since that would have caused some troubles with this keyboard selection mode, the block cursor now is no longer inverted when it is at the edges of a selection. Fixes #262.
* Run clippy on oldest supported versionChristian Duerr2020-03-12
| | | | | Since there were some problems with clippy suggesting changes that were not yet available in the oldest supported Rust compiler of Alacritty, the clippy stage has been moved from stable to 1.37.0.
* Fix ignoring of slow touchpad scrollingTimo2020-03-02
| | | Fixes #3377.
* Update glutin to v0.23.0Kirill Chibisov2020-02-07
| | | | | | | Fixes #3191. Fixes #3150. Fixes #1465. Fixes #1359.
* Remove unsetting of dirty flag on key pressChristian Duerr2020-02-03
| | | | | | There's no reason why we should ever manually set the terminal to not be dirty, since this can lead to a lot of other logic being affected. This also does not have any benefit and was likely added in the event loop rework as a bug (probably should have been dirty = true).
* Bump glutin to 0.22.0Christian Duerr2020-01-10
| | | Fixes #3165.
* Force exact modifiers match for mouse bindingsChristian Duerr2020-01-10
| | | Fixes #3152.
* Remove winit key remappingsChristian Duerr2020-01-06
|
* Add `Minimize` binding actionKirill Chibisov2020-01-05
| | | Fixes #2534.
* Bump winit to 0.20.0 Alpha 6Christian Duerr2020-01-05
| | | | | | | | Fixes #3070. Fixes #2893. Fixes #2877. Fixes #2829. Fixes #2767. Fixes #2271.
* Fix modifier inconsistenciesChristian Duerr2019-11-11
| | | Fixes #2906.
* Add UTF-8 mouse mode supportKirill Chibisov2019-11-04
| | | | Fixes #1934.
* Fix incorrect cell foreground when clearing screenChristian Duerr2019-11-04
| | | | | | | | | | | | | This fixes a bug that would clear the cells with the current template cell with just the `flags` reset, to make sure the colors are correct. However, the cell foreground was not reset, leading to cells counting as occupied when resizing. With this change both cell flags and foreground color are ignored when clearing both the whole screen and inside the line, allowing us to accurately keep track of cell occupation. Fixes #2866.
* Fix URL highlightingChristian Duerr2019-11-03
| | | | Fixes #2898. Fixes #2479.
* Add live config reload for font family and stylewayne2019-11-03
| | | | Fixes #2737.
* Fix sending chars with bind not clearing selectionKirill Chibisov2019-10-29
| | | | Fixes #2925.
* Add support for alternate scroll escapeAleksey Kuznetsov2019-10-15
| | | | Fixes #2727.
* Update to winit/glutin EventLoop 2.0Christian Duerr2019-10-05
This takes the latest glutin master to port Alacritty to the EventLoop 2.0 rework. This changes a big part of the event loop handling by pushing the event loop in a separate thread from the renderer and running both in parallel. Fixes #2796. Fixes #2694. Fixes #2643. Fixes #2625. Fixes #2618. Fixes #2601. Fixes #2564. Fixes #2456. Fixes #2438. Fixes #2334. Fixes #2254. Fixes #2217. Fixes #1789. Fixes #1750. Fixes #1125.