When CTRL-H is pressed send the CTRL-H char not the backspace char.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26138 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
cdb5a85e80
commit
bd434c17ab
@ -1147,7 +1147,7 @@ TermView::KeyDown(const char *bytes, int32 numBytes)
|
|||||||
BMessage *currentMessage = Looper()->CurrentMessage();
|
BMessage *currentMessage = Looper()->CurrentMessage();
|
||||||
if (currentMessage == NULL)
|
if (currentMessage == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
currentMessage->FindInt32("modifiers", &mod);
|
currentMessage->FindInt32("modifiers", &mod);
|
||||||
currentMessage->FindInt32("key", &key);
|
currentMessage->FindInt32("key", &key);
|
||||||
currentMessage->FindInt32("raw_char", &rawChar);
|
currentMessage->FindInt32("raw_char", &rawChar);
|
||||||
@ -1155,7 +1155,6 @@ TermView::KeyDown(const char *bytes, int32 numBytes)
|
|||||||
_ActivateCursor(true);
|
_ActivateCursor(true);
|
||||||
|
|
||||||
// Terminal filters RET, ENTER, F1...F12, and ARROW key code.
|
// Terminal filters RET, ENTER, F1...F12, and ARROW key code.
|
||||||
// TODO: Cleanup
|
|
||||||
if (numBytes == 1) {
|
if (numBytes == 1) {
|
||||||
const char *toWrite = NULL;
|
const char *toWrite = NULL;
|
||||||
switch (*bytes) {
|
switch (*bytes) {
|
||||||
@ -1169,7 +1168,10 @@ TermView::KeyDown(const char *bytes, int32 numBytes)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case B_BACKSPACE:
|
case B_BACKSPACE:
|
||||||
toWrite = BACKSPACE_KEY_CODE;
|
// Translate only the actual backspace key to the backspace
|
||||||
|
// code. CTRL-H shall just be echoed.
|
||||||
|
if (!((mod & B_CONTROL_KEY) && rawChar == 'h'))
|
||||||
|
toWrite = BACKSPACE_KEY_CODE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_LEFT_ARROW:
|
case B_LEFT_ARROW:
|
||||||
|
Loading…
Reference in New Issue
Block a user