Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTRL+A does not work #89

Closed
damemonyo opened this issue Apr 9, 2016 · 12 comments
Closed

CTRL+A does not work #89

damemonyo opened this issue Apr 9, 2016 · 12 comments

Comments

@damemonyo
Copy link

@damemonyo damemonyo commented Apr 9, 2016

CTRL+A does not work anyway. I examined this issue on bash prompt and emacs in bash window.

@damemonyo damemonyo changed the title CTRL+A CTRL+A does not work Apr 9, 2016
@B0073D
Copy link

@B0073D B0073D commented Apr 9, 2016

I tried this after sshing into a server too, with no effect. So I'd suggest the CMD window is possibly 'catching' ctrl+a and not passing it to the shell.

@dschaefer
Copy link

@dschaefer dschaefer commented Apr 10, 2016

Any thoughts on a workaround. I'm guess CMD too, but can't see how to disable it if that's possible. If not that's a big hit for emacs lovers like myself.

@ophiry
Copy link

@ophiry ophiry commented Apr 10, 2016

I'm not sure it's related to CMD
cygwin does support CTRL+A
when executing bash from withing cygwin, CTRL+A doesn't work

@takekazuomi
Copy link

@takekazuomi takekazuomi commented Apr 11, 2016

By default Ctrl + A is select all text in the current line the Command Prompt. I disabled ctrl key shortcuts from Command Prompt menu. But still CTRL+A doesn't work.

@zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Apr 11, 2016

I'm gonna tag @dethoma and @russalex on this. We've been looking at this for a while, and I'm still not exactly certain where the problem is. I know that all of the Ctrl+ characters are translated (NOT intercepted) by the console window successfully on their way down to the subsystem, but I'm not sure why specifically Ctrl+A (SOH, \x01) doesn't seem to make it out of the subsystem.

@sunilmut
Copy link
Member

@sunilmut sunilmut commented Apr 11, 2016

Thanks for your feedback. Support for CTRL+A has been added in the code but the build has not made it to flighting yet.

@sunilmut sunilmut closed this Apr 11, 2016
@takekazuomi
Copy link

@takekazuomi takekazuomi commented Apr 27, 2016

It works fine on 14332. Thank you !

@prasannavl
Copy link

@prasannavl prasannavl commented Oct 3, 2017

@sunilmut

It works great on WSL now. But this is still an issue while running on Cygwin. conhost seems to be catching Ctrl+A, and selecting everything. Is there any generic way to switch this off, for instances like using it with Cygwin? I'm curious to know how the recent builds switch it off only for WSL.

@michielwittkampf
Copy link

@michielwittkampf michielwittkampf commented Dec 9, 2017

I'am on build 15063.726 (regular release).

CTRL-A doesn't do anything in a Bash on Ubuntu on Windows window.

Anyone else?

@zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Dec 11, 2017

@michielwittkampf I'm gonna need some more info -

  • what keyboard layout are you using?
  • Is there an specific application that C-a doesn't work in?
    • Does C-v, C-a from the bash commandline echo ^A to the input?
    • What does pressing C-h, k, C-a in emacs display? (scerenshot would be helpful)
  • What are the contents of your /etc/inputrc file?

@relston
Copy link

@relston relston commented May 27, 2019

@zadjii-msft I seem to be having this same issue on my Ubuntu WSL Bash prompt.
Normal keyboard layout (not sure what exactly you are asking, using a Surface 2 Laptop).
All bash shells for my WSL setup has this issue if I simply want to copy all the test in the terminal.
image
C-c copies correctly. C-v does not paste (get a ^V) every time I try to paste. C-Shift-C and C-Shift-V work as expected. C-a does nothing.
Funny thing is that the 'Select-All' from the edit menu works as expected:
image

Not sure if this matters but all of the ctrl commands work as expected in cmd

As for the /etc/inputrc here you go:

# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.

# Be 8 bit clean.
set input-meta on
set output-meta on

# To allow the use of 8bit-characters like the german umlauts, uncomment
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.

# set convert-meta off

# try to enable the application keypad when it is called.  Some systems
# need this to enable the arrow keys.
# set enable-keypad on

# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys

# do not bell on tab-completion
# set bell-style none
# set bell-style visible

# some defaults / modifications for the emacs mode
$if mode=emacs
# allow the use of the Home/End keys
"\e[1~": beginning-of-line
"\e[4~": end-of-line

# allow the use of the Delete/Insert keys
"\e[3~": delete-char
"\e[2~": quoted-insert

# mappings for "page up" and "page down" to step to the beginning/end
# of the history
# "\e[5~": beginning-of-history
# "\e[6~": end-of-history

# alternate mappings for "page up" and "page down" to search the history
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward

# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
"\e[1;5C": forward-word
"\e[1;5D": backward-word
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word

$if term=rxvt
"\e[7~": beginning-of-line
"\e[8~": end-of-line
"\eOc": forward-word
"\eOd": backward-word
$endif

# for non RH/Debian xterm, can't hurt for RH/Debian xterm
# "\eOH": beginning-of-line
# "\eOF": end-of-line

# for freebsd console
# "\e[H": beginning-of-line
# "\e[F": end-of-line

$endif

Hope this is helpful. Would love to find a solution to this because VS Code integrated terminal has the same issues. I don't have alt menus to work with there.

@zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented May 28, 2019

Wait, are you expecting Ctrl-A to select all text, or to send a Ctrl-A to the commandline application that's running (e.g. bash)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants