Comments (5)
Having the same problem here on linux/us layout with multiple terminals/shells (including tty!), so it's not just macs -- upon further digging it looks like it's a feature; for example xterm's code:
https://github.com/xterm-x11/xterm-snapshots/blob/master/input.c#L267
* X "normally" has some built-in translations, which the user may want to
* suppress when processing the modifyOtherKeys resource. In particular, the
* control modifier applied to some of the keyboard digits gives results for
* control characters.
*
* control 2 0 NUL
* control 3 0x1b ESC
* control 4 0x1c FS
* control 5 0x1d GS
* control 6 0x1e RS
* control 7 0x1f US
* control 8 0x7f DEL
So ctrl-3 is escape, that'd close the search interface alright...
Looking at showkey -a
output it's also easy to confirm the keys atuin can see are ambiguous, so there's not much that can be done here... Apparently some terminals can be configured to override which key is sent, but that's not obvious, will be a battle everytime you change term, and I'm not quite sure what character would be appropriate to send in the first place anyway!
Since I cannot use alt for this (taken up by my window manager), I'd be tempted to suggest other alternatives (shift-number, F keys, first row...) -- but that'll depend heavily on the keyboard layout, perhaps it'd be simpler to just let users bind each key individually?
The code in atuin/src/command/client/search/interactive.rs is currently a big match switch that's a tad unwieldy to customize but I guess it'll be an investment that pays off for everyone who isn't on us layout as well.
(If using alt I'd also consider allowing escape to not close the interactive view, as escape+digit could acts as alt (meta), but that doesn't look possible to disable right now either)
Until then, we can just ignore the pretty numbers on the left! :p
from atuin.
In my macOS, iTerm2 3.4.23.
ctrl+1
, ctrl+2
, ctrl+3
, ctrl+8
, ctrl+9
can't work, the others are OK.
ctrl+1
and ctrl+9
will print 1
and 9
.
ctrl+2
print the space
.
Pressed ctrl+3
, search UI will exit. But the result don't display to prompt.
Pressed ctrl+8
, nothing happen.
from atuin.
Do you have any bindings setup? iTerm often has a bunch of shortcuts defined in its keys settings.
Also - what keyboard layout are you using?
from atuin.
There are Key Mappings in iTerm2 as follow.
from atuin.
I'm also having issues. I have a lot of terminals on my Mac, so I tested in all of them:
- kitty: ctrl-1 and ctrl-2 insert 1 and 2, respectively, in the search bar. ctrl-3 exits atuin but puts nothing on my prompt. ctrl-4 through ctrl-7 work as expected. ctrl-8 does nothing. ctrl-9 inserts 9
- hyper: ctrl-1 and ctrl-2 do nothing. ctrl-3 exists atuin but puts nothing on my prompt. ctrl-4 through ctrl-7 work as expected. ctrl-8 and ctrl-9 do nothing
- wezterm: ctrl-1 inserts 1. ctrl-2 inserts space. ctrl-3 exits atuin but puts nothing on my prompt. ctrl-4 through ctrl-7 work as expected. ctrl-8 does nothing. ctrl-9 inserts 9
- tabby: ctrl-1, ctrl-2, ctrl-8, and ctrl-9 do nothing. ctrl-3 exits atuin but puts nothing on my prompt. ctrl-4 through ctrl-7 work as expected
- iterm2: ctrl-1 inserts 1. ctrl-2 inserts space. ctrl-3 exits atuin but puts nothing on my prompt. ctrl-4 through ctrl-7 work as expected. ctrl-8 does nothing. ctrl-9 inserts 9
- cool-retro-term: none of the ctrl-n keys do anything
- alacritty: ctrl-n inserts n (e.g., ctrl-1 inserts 1, ctrl-2 inserts 2, etc.)
I don't actually use most of these terminals, so I doubt that it's my config that's the issue.
from atuin.
Related Issues (20)
- Atuin doesnโt clear the screen with MOSH, works fine with SSH HOT 2
- Doc about the atuin "context" HOT 1
- Subprocess commands missing from history HOT 2
- doctor does not detect ble or pre-exec HOT 9
- sync -f "Failed to decrypt history!" error HOT 1
- could not load client settings HOT 4
- `atuin sync` fails with `error decoding response body` HOT 5
- Error executing migration on latest image HOT 4
- Nushell: aliases syncing doesnt work HOT 2
- Add a systemd service file HOT 9
- Deprecation warning nushell HOT 1
- crashed on zsh HOT 5
- [Bug]: Atuin flags Starship "background processes" flag after each command. HOT 1
- [Bug]: Inspector thinks that command that exited 0 exited with -1
- [Bug]: Inspector draws bar chart bar over corresponding number of exit codes
- [Bug]: atuin stats panics when faced with unusual string in history
- [Bug]: `atuin import auto` doesn't work for xonsh? HOT 1
- [Bug]: Out of disk space makes atuin unusable HOT 6
- [Bug]: Incompatibility with oh-my-zsh plugin per-directory-history
- [Bug]: Cannot Start Self-Hosted When Postgres Uses Non-Default Port HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atuin.