summaryrefslogtreecommitdiffstats
path: root/base/win
diff options
context:
space:
mode:
authordtapuska <dtapuska@chromium.org>2015-10-20 15:09:39 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-20 22:10:37 +0000
commit6d3c3b3afc4254ef33096895e349f43431ecbcb4 (patch)
treefa89119911a42e756bb43a0f749192003039e913 /base/win
parentfdc03f9d18a90839cc7c389e98c0c9913457c484 (diff)
downloadchromium_src-6d3c3b3afc4254ef33096895e349f43431ecbcb4.zip
chromium_src-6d3c3b3afc4254ef33096895e349f43431ecbcb4.tar.gz
chromium_src-6d3c3b3afc4254ef33096895e349f43431ecbcb4.tar.bz2
Set modifier flags for Caps, OS, Scroll and Num Lock on X11 and Windows.
Adjust the bit translation functions to ensure the values are set correctly on the WebInputEvent. Add support for querying the values from the native OS on Windows. Collapse duplicated code in the Windows event builder to query active key states. BUG=265458 Review URL: https://codereview.chromium.org/1372253005 Cr-Commit-Position: refs/heads/master@{#355170}
Diffstat (limited to 'base/win')
-rw-r--r--base/win/win_util.cc17
-rw-r--r--base/win/win_util.h14
2 files changed, 0 insertions, 31 deletions
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index 98d451f..93ec543 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -290,23 +290,6 @@ bool GetUserSidString(std::wstring* user_sid) {
return true;
}
-bool IsShiftPressed() {
- return (::GetKeyState(VK_SHIFT) & 0x8000) == 0x8000;
-}
-
-bool IsCtrlPressed() {
- return (::GetKeyState(VK_CONTROL) & 0x8000) == 0x8000;
-}
-
-bool IsAltPressed() {
- return (::GetKeyState(VK_MENU) & 0x8000) == 0x8000;
-}
-
-bool IsAltGrPressed() {
- return (::GetKeyState(VK_MENU) & 0x8000) == 0x8000 &&
- (::GetKeyState(VK_CONTROL) & 0x8000) == 0x8000;
-}
-
bool UserAccountControlIsEnabled() {
// This can be slow if Windows ends up going to disk. Should watch this key
// for changes and only read it once, preferably on the file thread.
diff --git a/base/win/win_util.h b/base/win/win_util.h
index 3c900ff..384db80 100644
--- a/base/win/win_util.h
+++ b/base/win/win_util.h
@@ -61,20 +61,6 @@ BASE_EXPORT void GetNonClientMetrics(NONCLIENTMETRICS_XP* metrics);
// Returns the string representing the current user sid.
BASE_EXPORT bool GetUserSidString(std::wstring* user_sid);
-// Returns true if the shift key is currently pressed.
-BASE_EXPORT bool IsShiftPressed();
-
-// Returns true if the ctrl key is currently pressed.
-BASE_EXPORT bool IsCtrlPressed();
-
-// Returns true if the alt key is currently pressed.
-BASE_EXPORT bool IsAltPressed();
-
-// Returns true if the altgr key is currently pressed.
-// Windows does not have specific key code and modifier bit and Alt+Ctrl key is
-// used as AltGr key in Windows.
-BASE_EXPORT bool IsAltGrPressed();
-
// Returns false if user account control (UAC) has been disabled with the
// EnableLUA registry flag. Returns true if user account control is enabled.
// NOTE: The EnableLUA registry flag, which is ignored on Windows XP