Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: views/controls/textfield/native_textfield_win.cc

Issue 115934: Ignore the insert key so we don't switch into overtype mode (which surprises ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/native_textfield_win.cc
===================================================================
--- views/controls/textfield/native_textfield_win.cc (revision 17129)
+++ views/controls/textfield/native_textfield_win.cc (working copy)
@@ -420,6 +420,10 @@
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;
Finnur 2011/03/25 14:44:00 Peter, did you mean to add a break statement here
Peter Kasting 2011/03/25 19:25:12 The latter. Shift-insert == ctrl-v. See also how
Finnur 2011/03/25 19:27:57 Excellent. I guess I'll add a comment here for fut
case 'V':
if ((flags & KF_ALTDOWN) ||
(GetKeyState((key == 'V') ? VK_CONTROL : VK_SHIFT) >= 0))
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698