summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc5
-rw-r--r--views/controls/textfield/native_textfield_win.cc4
2 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 25fcbf2..3b5a61c 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -1729,6 +1729,11 @@ bool AutocompleteEditViewWin::OnKeyDownOnlyWritable(TCHAR key,
return true;
case VK_INSERT:
+ // Ignore insert by itself, so we don't turn overtype mode on/off.
+ if (!(flags & KF_ALTDOWN) && (GetKeyState(VK_SHIFT) >= 0) &&
+ (GetKeyState(VK_CONTROL) >= 0))
+ return true;
+ // FALL THROUGH
case 'V':
if ((flags & KF_ALTDOWN) ||
(GetKeyState((key == 'V') ? VK_CONTROL : VK_SHIFT) >= 0))
diff --git a/views/controls/textfield/native_textfield_win.cc b/views/controls/textfield/native_textfield_win.cc
index 401116c..ff20496 100644
--- a/views/controls/textfield/native_textfield_win.cc
+++ b/views/controls/textfield/native_textfield_win.cc
@@ -420,6 +420,10 @@ void NativeTextfieldWin::OnKeyDown(TCHAR key, UINT repeat_count, UINT flags) {
return;
case VK_INSERT:
+ // Ignore insert by itself, so we don't turn overtype mode on/off.
+ if (!(flags & KF_ALTDOWN) && (GetKeyState(VK_SHIFT) >= 0) &&
+ (GetKeyState(VK_CONTROL) >= 0))
+ return;
case 'V':
if ((flags & KF_ALTDOWN) ||
(GetKeyState((key == 'V') ? VK_CONTROL : VK_SHIFT) >= 0))