Use '\b' instead of ('h' - 'a' + 1)

This commit is contained in:
Daniel Richard G 2013-09-18 16:41:23 -04:00
parent 718d411699
commit 70b6bad551
2 changed files with 2 additions and 2 deletions

View File

@ -1209,7 +1209,7 @@ void GraphicsWindow::EditControlDone(const char *s) {
}
bool GraphicsWindow::KeyDown(int c) {
if(c == ('h' - 'a') + 1) {
if(c == '\b') {
// Treat backspace identically to escape.
MenuEdit(MNU_UNSELECT_ALL);
return true;

View File

@ -538,7 +538,7 @@ static BOOL ProcessKeyDown(WPARAM wParam)
case VK_TAB: c = '\t'; break;
case VK_BROWSER_BACK:
case VK_BACK: c = 1 + 'h' - 'a'; break;
case VK_BACK: c = '\b'; break;
case VK_F1:
case VK_F2: