Verified
Status Update
Comments
br...@google.com <br...@google.com> #2
It looks like hterm / Secure Shell is configured by default
to have shift sequences like Alt-f transmit ESC f over SSH.
It would be better if they could be configured to send
characters with the high bit set. There are come configuration
settings for this, but they appear to funky non-English
Unicode characters. Maybe my stty settings are wrong.
Regardless, Alt+backspace sends the wrong sequence of characters.
It should send ESC DEL as hterm now works, not ESC [ 3 ~.
to have shift sequences like Alt-f transmit ESC f over SSH.
It would be better if they could be configured to send
characters with the high bit set. There are come configuration
settings for this, but they appear to funky non-English
Unicode characters. Maybe my stty settings are wrong.
Regardless, Alt+backspace sends the wrong sequence of characters.
It should send ESC DEL as hterm now works, not ESC [ 3 ~.
rg...@chromium.org <rg...@chromium.org> #4
FWIW, my emacs and bash both work fine by default. In emacs, M-x describe-key, followed by alt-backspace the minibuffer displays "ESC DEL" and the help view shows, "M-DEL runs the command backward-kill-word".
kr...@chromium.org <kr...@chromium.org> #5
[Empty comment from Monorail migration]
va...@chromium.org <va...@chromium.org> #6
not sure this is a hterm bug. cros itself has mapped alt+backspace to be the delete key. you can use ctrl+W by default to be "backward-kill-word".
br...@google.com <br...@google.com> #7
It looks like the behavior only happens on Chromebooks. ChromeOS on
Chromebooks appears to make the Alt+Backspace key combination generate the same
thing that standard full size PC keyboards generate for the Delete key, the one
positioned near the Insert, Home, and End keys.
I can see why this is done. For many applications you want to be able to
produce Delete, so Chromebooks give you a way, Alt+Backspace.
As an Emacs user who edits code, I would like to have a ChromeOS configuration
option that removes the special handling of Alt+Backspace on the Chromebook, so
that it acts just like Alt+Backspace on a standard keyboard. Without this
configuration option, I have to write special bash and Emacs config code that's
activated only when I use a Chromebook. And I don't want the config code
active for Chromeboxes, since they behave correctly!
Chromebooks appears to make the Alt+Backspace key combination generate the same
thing that standard full size PC keyboards generate for the Delete key, the one
positioned near the Insert, Home, and End keys.
I can see why this is done. For many applications you want to be able to
produce Delete, so Chromebooks give you a way, Alt+Backspace.
As an Emacs user who edits code, I would like to have a ChromeOS configuration
option that removes the special handling of Alt+Backspace on the Chromebook, so
that it acts just like Alt+Backspace on a standard keyboard. Without this
configuration option, I have to write special bash and Emacs config code that's
activated only when I use a Chromebook. And I don't want the config code
active for Chromeboxes, since they behave correctly!
ds...@gmail.com <ds...@gmail.com> #8
Control-D is how I forward delete on OS X and anything else with emacs key bindings.
This is the #1 thing that makes Chrome OS really hard to use. There are three buttons (or button combinations) I can use to go back a page, but none I can use to go back a word. I find it quite hard to do any actual text manipulation work when I only have arrows and the cursor to deal with.
This is the #1 thing that makes Chrome OS really hard to use. There are three buttons (or button combinations) I can use to go back a page, but none I can use to go back a word. I find it quite hard to do any actual text manipulation work when I only have arrows and the cursor to deal with.
rg...@chromium.org <rg...@chromium.org> #9
dsailings, are you talking about this bug (specifically, alt+backspace)?
If you're having issues with Ctrl-D, then right click on the launcher icon and select "Open as Window". See this entry in the FAQ:http://git.chromium.org/gitweb/?p=chromiumos/platform/assets.git;a=blob;f=chromeapps/hterm/doc/faq.txt#l464
This issue is about what alt-backspace does on a Chromebook. +yusukes, do you want this one, or is it on the Chrome OS system side?
If you're having issues with Ctrl-D, then right click on the launcher icon and select "Open as Window". See this entry in the FAQ:
This issue is about what alt-backspace does on a Chromebook. +yusukes, do you want this one, or is it on the Chrome OS system side?
ds...@gmail.com <ds...@gmail.com> #10
I discovered the new window thing after this. Makes the experience quite nice (with the exception of the alt backspace thing which I'd still like to work better).
I didn't see that this was specific to terminal emulator when I filed it, so apologies for the extra noise. I'd actually like all the key bindings I'm used to from MacOS / emacs / shell / linux / etc... everywhere.
I didn't see that this was specific to terminal emulator when I filed it, so apologies for the extra noise. I'd actually like all the key bindings I'm used to from MacOS / emacs / shell / linux / etc... everywhere.
yu...@chromium.org <yu...@chromium.org> #11
#8
The remapping (Alt+BS -> Del) is done in Chrome.
+danakj
Do you have any idea to fix the problem described in #6?
The remapping (Alt+BS -> Del) is done in Chrome.
+danakj
Do you have any idea to fix the problem described in #6?
yu...@chromium.org <yu...@chromium.org> #12
[Empty comment from Monorail migration]
da...@chromium.org <da...@chromium.org> #13
Alt+Search+Backspace should produce an Alt+Backspace.
Since we have Search+Backspace for delete etc, I'd personally really like to see us move the Alt+___ bindings behind a preference (accessibility pref probably).
Since we have Search+Backspace for delete etc, I'd personally really like to see us move the Alt+___ bindings behind a preference (accessibility pref probably).
yu...@chromium.org <yu...@chromium.org> #14
brown@
Can I close the issue?
Can I close the issue?
br...@google.com <br...@google.com> #15
I don't think the bug should be closed. I'll give Alt+Search+Backspace a try
on my Chromebook and see what it does.
The essential problem is that a Chromebook keyboard does not have as many keys
as a full-size PC keyboard. Some Chromebook users need an easy way to generate
"keypad delete" (the delete that's near "home" and "insert" on a big keyboard).
That's what Alt-Backspace on a Chromebook keyboard currently produces. Other
users want the key sequence Alt-Backspace to do the right thing for Emacs,
which is to generate "escape followed by delete" or "delete with the high bit
set".
Ideally, the behavior of Alt-Backspace should be determined by a preference
setting. That would make everyone happy.
bob
on my Chromebook and see what it does.
The essential problem is that a Chromebook keyboard does not have as many keys
as a full-size PC keyboard. Some Chromebook users need an easy way to generate
"keypad delete" (the delete that's near "home" and "insert" on a big keyboard).
That's what Alt-Backspace on a Chromebook keyboard currently produces. Other
users want the key sequence Alt-Backspace to do the right thing for Emacs,
which is to generate "escape followed by delete" or "delete with the high bit
set".
Ideally, the behavior of Alt-Backspace should be determined by a preference
setting. That would make everyone happy.
bob
jo...@chromium.org <jo...@chromium.org> #16
FWIW, I don't think the workaround in #12 works, if I type this into Emacs from a Chromebook, with default settings for hterm, Emacs shows "5~".
jo...@chromium.org <jo...@chromium.org> #17
I'm not sure of a better place to document this workaround, so I'll put it here. This works with Ubuntu / bash / Emacs 23.3.1 / default hterm settings.
For Bash, put a line like this in .bashrc:
export INPUTRC=~/.inputrc
and in .inputrc put this:
"\e[3~": backward-kill-word
If that doesn't work for you, you may need to type Ctrl+V in your shell followed by Alt+Backspace, see what it shows, replace ^{ with \e and use that as the string at the start of line instead.
For Emacs, add this to your .emacs:
(global-set-key (kbd "<deletechar>") 'backward-kill-word)
For Bash, put a line like this in .bashrc:
export INPUTRC=~/.inputrc
and in .inputrc put this:
"\e[3~": backward-kill-word
If that doesn't work for you, you may need to type Ctrl+V in your shell followed by Alt+Backspace, see what it shows, replace ^{ with \e and use that as the string at the start of line instead.
For Emacs, add this to your .emacs:
(global-set-key (kbd "<deletechar>") 'backward-kill-word)
da...@chromium.org <da...@chromium.org> #18
Does just Alt-Backspace or Search-Backspace still delete? It sounds like you've rebound those instead?
jo...@chromium.org <jo...@chromium.org> #19
With those rebindings I only have Backspace, no Delete. For me that's not an issue.
For any further discussion of rebinding workarounds, let me suggest we move it to this thread:https://groups.google.com/a/chromium.org/forum/?fromgroups=#!searchin/chromium-hterm/backspace/chromium-hterm/KFwnUwuD4Io/sNpqS8ZletkJ
For any further discussion of rebinding workarounds, let me suggest we move it to this thread:
bu...@chromium.org <bu...@chromium.org> #20
[Empty comment from Monorail migration]
ad...@chromium.org <ad...@chromium.org> #21
I'm putting in a hack to hterm to fix this.
ad...@chromium.org <ad...@chromium.org> #22
[Empty comment from Monorail migration]
bu...@chromium.org <bu...@chromium.org> #23
Project: chromiumos/platform/assets
Branch : master
Author : Andrew de los Reyes <adlr@chromium.org>
Commit : f07dddd105813812aff8867bdcf9d0e26ecb96db
Code Review +2: Robert Ginda
Verified +1: Andrew de los Reyes
Change-Id : Ie480d7087495704c7e3417d08c4e99702d5f85a0
Reviewed-at :https://gerrit.chromium.org/gerrit/47323
hterm: Support to detect alt-backspace when it's remapped to DEL.
BUG=chromium:174410
TEST=Manually tested the following cases before and after to see the
same behavior w/ the pref disabled:
DEL: 0x1b 5b 33 7e == '\x1b[3~'
Backspace: 0x7f
Esc: 0x1b
Alt-Del: 0x1b 5b 33 3b 33 7e == '\x1b[3;3~'
And w/ the pref enabled, saw that Alt-backspace did:
Alt-Backspace: 0x1b 7f (this is the only chage from this CL)
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
M chromeapps/hterm/doc/changelog.txt
M chromeapps/hterm/js/hterm_keyboard.js
M chromeapps/hterm/js/hterm_keyboard_keymap.js
M chromeapps/hterm/js/hterm_preference_manager.js
M chromeapps/hterm/js/hterm_terminal.js
Branch : master
Author : Andrew de los Reyes <adlr@chromium.org>
Commit : f07dddd105813812aff8867bdcf9d0e26ecb96db
Code Review +2: Robert Ginda
Verified +1: Andrew de los Reyes
Change-Id : Ie480d7087495704c7e3417d08c4e99702d5f85a0
Reviewed-at :
hterm: Support to detect alt-backspace when it's remapped to DEL.
BUG=chromium:174410
TEST=Manually tested the following cases before and after to see the
same behavior w/ the pref disabled:
DEL: 0x1b 5b 33 7e == '\x1b[3~'
Backspace: 0x7f
Esc: 0x1b
Alt-Del: 0x1b 5b 33 3b 33 7e == '\x1b[3;3~'
And w/ the pref enabled, saw that Alt-backspace did:
Alt-Backspace: 0x1b 7f (this is the only chage from this CL)
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
M chromeapps/hterm/doc/changelog.txt
M chromeapps/hterm/js/hterm_keyboard.js
M chromeapps/hterm/js/hterm_keyboard_keymap.js
M chromeapps/hterm/js/hterm_preference_manager.js
M chromeapps/hterm/js/hterm_terminal.js
br...@google.com <br...@google.com> #25
chromium@googlecode.com writes:
>https://crbug.com/chromium/174410#c22 on https://crbug.com/chromium/174410 by bugdro...@chromium.org: Alt-backspace
> sends "delete" on Chromebook keyboard
>http://code.google.com/p/chromium/issues/detail?id=174410#c22
>
> Project: chromiumos/platform/assets
> Branch : master
> Author : Andrew de los Reyes <adlr@chromium.org>
> Commit : f07dddd105813812aff8867bdcf9d0e26ecb96db
>
> Code Review +2: Robert Ginda
> Verified +1: Andrew de los Reyes
> Change-Id : Ie480d7087495704c7e3417d08c4e99702d5f85a0
> Reviewed-at :https://gerrit.chromium.org/gerrit/47323
>
> hterm: Support to detect alt-backspace when it's remapped to DEL.
>
> BUG=chromium:174410
>
> TEST=Manually tested the following cases before and after to see the
> same behavior w/ the pref disabled:
> DEL: 0x1b 5b 33 7e == '\x1b[3~'
> Backspace: 0x7f
> Esc: 0x1b
> Alt-Del: 0x1b 5b 33 3b 33 7e == '\x1b[3;3~'
>
> And w/ the pref enabled, saw that Alt-backspace did:
> Alt-Backspace: 0x1b 7f (this is the only chage from this CL)
Thanks very much for modifying hterm to fix this bug!
I'm curious to know why "1b 7f" (ESC DEL) is the correct sequence
of bytes for hterm to transmit when I type Alt-DEL. Shouldn't
the right sequence for Alt-DEL be just "ff"?
My understanding of Alt processing is that when Alt is used as a
shift key, it doesn't mean transmit ESC followed by the character
I typed. Instead, it means take the ASCII code of the character
I typed, logically OR that code with 0x80 and transmit the
result.
bob
>
> sends "delete" on Chromebook keyboard
>
>
> Project: chromiumos/platform/assets
> Branch : master
> Author : Andrew de los Reyes <adlr@chromium.org>
> Commit : f07dddd105813812aff8867bdcf9d0e26ecb96db
>
> Code Review +2: Robert Ginda
> Verified +1: Andrew de los Reyes
> Change-Id : Ie480d7087495704c7e3417d08c4e99702d5f85a0
> Reviewed-at :
>
> hterm: Support to detect alt-backspace when it's remapped to DEL.
>
> BUG=chromium:174410
>
> TEST=Manually tested the following cases before and after to see the
> same behavior w/ the pref disabled:
> DEL: 0x1b 5b 33 7e == '\x1b[3~'
> Backspace: 0x7f
> Esc: 0x1b
> Alt-Del: 0x1b 5b 33 3b 33 7e == '\x1b[3;3~'
>
> And w/ the pref enabled, saw that Alt-backspace did:
> Alt-Backspace: 0x1b 7f (this is the only chage from this CL)
Thanks very much for modifying hterm to fix this bug!
I'm curious to know why "1b 7f" (ESC DEL) is the correct sequence
of bytes for hterm to transmit when I type Alt-DEL. Shouldn't
the right sequence for Alt-DEL be just "ff"?
My understanding of Alt processing is that when Alt is used as a
shift key, it doesn't mean transmit ESC followed by the character
I typed. Instead, it means take the ASCII code of the character
I typed, logically OR that code with 0x80 and transmit the
result.
bob
ad...@chromium.org <ad...@chromium.org> #26
When you are using Alt as a Meta key (as, I think, is common), Alt-Anything prepends ESC to Anything.
You would expect, then, that Alt-Backspace would transmit ESC (0x1b) followed by Backspace (0x7f), but this did not happen. The reason it didn't happen is that Chrome OS traps Alt-Backspace and sends a DEL key instead (on all apps, not just hterm/ssh). This CL uses a hack to detect a genuine DEL keypress (user hits DEL) from a synthetic one (user hits Alt-Backspace), and uses that to undo the Chrome OS Alt-Backspace->DEL remap.
Just to be clear on your questions:
0x1b 7f is the correct sequence for ESC-backspace and for Alt-Backspace, but it is not the correct sequence for ESC DEL. I didn't change the behavior of ESC DEL in this CL.
Also, I am not sure if you are correct or not about the most significant bit of a sequence being an ESC-bit. I've never heard of that or tried that, but I know for sure it works to send a separate 0x1b byte first for ESC.
You would expect, then, that Alt-Backspace would transmit ESC (0x1b) followed by Backspace (0x7f), but this did not happen. The reason it didn't happen is that Chrome OS traps Alt-Backspace and sends a DEL key instead (on all apps, not just hterm/ssh). This CL uses a hack to detect a genuine DEL keypress (user hits DEL) from a synthetic one (user hits Alt-Backspace), and uses that to undo the Chrome OS Alt-Backspace->DEL remap.
Just to be clear on your questions:
0x1b 7f is the correct sequence for ESC-backspace and for Alt-Backspace, but it is not the correct sequence for ESC DEL. I didn't change the behavior of ESC DEL in this CL.
Also, I am not sure if you are correct or not about the most significant bit of a sequence being an ESC-bit. I've never heard of that or tried that, but I know for sure it works to send a separate 0x1b byte first for ESC.
br...@google.com <br...@google.com> #27
chromium@googlecode.com writes:
>
>https://crbug.com/chromium/174410#c25 on https://crbug.com/chromium/174410 by adlr@chromium.org: Alt-backspace
> sends "delete" on Chromebook keyboard
>http://code.google.com/p/chromium/issues/detail?id=174410
>
> When you are using Alt as a Meta key (as, I think, is common), Alt-Anything
> prepends ESC to Anything.
>
> ....
>
> Also, I am not sure if you are correct or not about the most significant
> bit of a sequence being an ESC-bit. I've never heard of that or tried that,
> but I know for sure it works to send a separate 0x1b byte first for ESC.
Please take a look at
https://critique.corp.google.com/#review/45010626
especially the sections called "Simple Keys" and "The ESC
Prefix".
A long time ago, when people used hardware terminals connected to
their computer with RS-232 cables, some terminals had a Meta or
Alt key. If the serial port was configured so that input was
8-bit clean, then the Meta shift key, which turned on the high
bit of each character, could be used when running Emacs. It was
hard to configure, since modems and terminal concentrators often
only wanted to send 7-bits characters. In this world, how could
people whose terminal lacked a Meta key or who were plagued by
7-bit connections enjoy Emacs? The workaround of using ESC was
invented.
Today, terminal emulators often offer a configuration choice
regarding what to do when the user types a Meta key sequence.
Generally, one is given a choice between sending 8-bit data and
sending ESC characters.
It would be nice if hterm had a configuration option for this.
>
>
> sends "delete" on Chromebook keyboard
>
>
> When you are using Alt as a Meta key (as, I think, is common), Alt-Anything
> prepends ESC to Anything.
>
> ....
>
> Also, I am not sure if you are correct or not about the most significant
> bit of a sequence being an ESC-bit. I've never heard of that or tried that,
> but I know for sure it works to send a separate 0x1b byte first for ESC.
Please take a look at
especially the sections called "Simple Keys" and "The ESC
Prefix".
A long time ago, when people used hardware terminals connected to
their computer with RS-232 cables, some terminals had a Meta or
Alt key. If the serial port was configured so that input was
8-bit clean, then the Meta shift key, which turned on the high
bit of each character, could be used when running Emacs. It was
hard to configure, since modems and terminal concentrators often
only wanted to send 7-bits characters. In this world, how could
people whose terminal lacked a Meta key or who were plagued by
7-bit connections enjoy Emacs? The workaround of using ESC was
invented.
Today, terminal emulators often offer a configuration choice
regarding what to do when the user types a Meta key sequence.
Generally, one is given a choice between sending 8-bit data and
sending ESC characters.
It would be nice if hterm had a configuration option for this.
th...@taskforce.co.uk <th...@taskforce.co.uk> #28
I presume this is for Googlers only ?
ad...@chromium.org <ad...@chromium.org> #29
@brown, interesting; I didn't know that. I recommend you have a look at the hterm code and consider making a CL for this.
Also, the critique link appears to be for something completely unrelated.
Also, the critique link appears to be for something completely unrelated.
br...@google.com <br...@google.com> #30
chromium@googlecode.com writes:
>https://crbug.com/chromium/174410#c27 on https://crbug.com/chromium/174410 by t...@taskforce.co.uk: Alt-backspace
> sends "delete" on Chromebook keyboard
>http://code.google.com/p/chromium/issues/detail?id=174410
>
> I presume this is for Googlers only ?
Sorry, I pasted the wrong link. Here's a link to the web page
that discusses Emacs and the function of the Meta key. As
before, the important sections are "Simple Keys" and "The ESC
Prefix".
http://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html
bob
>
> sends "delete" on Chromebook keyboard
>
>
> I presume this is for Googlers only ?
Sorry, I pasted the wrong link. Here's a link to the web page
that discusses Emacs and the function of the Meta key. As
before, the important sections are "Simple Keys" and "The ESC
Prefix".
bob
br...@google.com <br...@google.com> #31
[Comment Deleted]
[Deleted User] <[Deleted User]> #32
Platform 28.0.1488.0 dev
ChromeOS 4044.0.0 dev-channel link
ChromeOS 4044.0.0 dev-channel link
mi...@gmail.com <mi...@gmail.com> #33
[Comment Deleted]
is...@google.com <is...@google.com> #34
This issue was migrated from crbug.com/chromium/174410?no_tracker_redirect=1
[Multiple monorail components: UI, UI>Shell>WindowManager]
[Monorail components added to Component Tags custom field.]
[Multiple monorail components: UI, UI>Shell>WindowManager]
[Monorail components added to Component Tags custom field.]
Description
Chrome Version : <Google Chrome 21.0.1180.68>
OS Version : <Platform 2465.105.0>
Type of computer : <Cr-48>
Network info : <network, encryption type, router model (if known)>
Please specify Area-* of the system to which this bug/feature applies.
hterm / Secure Shell
What steps will reproduce the problem?
What is the expected output?
No output is expected.
What do you see instead?
Shell displays ^[[3~
How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)
always
What is the impact to the user, and is there a workaround? If so, what is
it?
Alt-backspace in Emacs and bash does not work. It is the key sequence for deleting the word to the left of the cursor.
This key sequence should generate a delete character with the high bit set. Alt-f and Alt-b do work correctly in Emacs. They generate f and b with the high bit set. The xterm terminfo entry says that ^[[3~ should be generated by the delete-character key. That's a different key ... not the delete/backspace key.
Please provide any additional information below.