Treat delete, backspace, and browser back all identically.
[git-p4: depot-paths = "//depot/solvespace/": change = 2036]
This commit is contained in:
parent
bdf60690c1
commit
9f78ee3c33
10
draw.cpp
10
draw.cpp
@ -924,6 +924,16 @@ void GraphicsWindow::EditControlDone(char *s) {
|
||||
}
|
||||
}
|
||||
|
||||
bool GraphicsWindow::KeyDown(int c) {
|
||||
if(c == ('h' - 'a') + 1) {
|
||||
// Treat backspace identically to escape.
|
||||
MenuEdit(MNU_UNSELECT_ALL);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void GraphicsWindow::MouseScroll(double x, double y, int delta) {
|
||||
double offsetRight = offset.Dot(projRight);
|
||||
double offsetUp = offset.Dot(projUp);
|
||||
|
1
ui.h
1
ui.h
@ -483,6 +483,7 @@ public:
|
||||
void MouseRightUp(double x, double y);
|
||||
void MouseScroll(double x, double y, int delta);
|
||||
void MouseLeave(void);
|
||||
bool KeyDown(int c);
|
||||
void EditControlDone(char *s);
|
||||
|
||||
SDWORD lastSpaceNavigatorTime;
|
||||
|
@ -533,12 +533,6 @@ static BOOL ProcessKeyDown(WPARAM wParam)
|
||||
}
|
||||
}
|
||||
|
||||
if(wParam == VK_BACK && !GraphicsEditControlIsVisible()) {
|
||||
TextWindow::ScreenHome(0, 0);
|
||||
SS.TW.Show();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int c;
|
||||
switch(wParam) {
|
||||
case VK_OEM_PLUS: c = '+'; break;
|
||||
@ -552,6 +546,9 @@ static BOOL ProcessKeyDown(WPARAM wParam)
|
||||
case VK_DELETE: c = 127; break;
|
||||
case VK_TAB: c = '\t'; break;
|
||||
|
||||
case VK_BROWSER_BACK:
|
||||
case VK_BACK: c = 1 + 'h' - 'a'; break;
|
||||
|
||||
case VK_F1:
|
||||
case VK_F2:
|
||||
case VK_F3:
|
||||
@ -588,6 +585,8 @@ static BOOL ProcessKeyDown(WPARAM wParam)
|
||||
}
|
||||
}
|
||||
|
||||
if(SS.GW.KeyDown(c)) return TRUE;
|
||||
|
||||
// No accelerator; process the key as normal.
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
grid
|
||||
multi-drag
|
||||
backslash / escape
|
||||
|
||||
-----
|
||||
wireframe export
|
||||
|
Loading…
Reference in New Issue
Block a user