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

Unified Diff: ui/events/ozone/evdev/keyboard_evdev.cc

Issue 878673004: Handle Caps Lock for Ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove spurious file Created 5 years, 11 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 | « ui/events/ozone/evdev/keyboard_evdev.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/keyboard_evdev.cc
diff --git a/ui/events/ozone/evdev/keyboard_evdev.cc b/ui/events/ozone/evdev/keyboard_evdev.cc
index c569bb9a8a3de3629cc61bc1d7af37e6923e454d..47280f351bb64cf67cc964490c1d5a62fc7e9c44 100644
--- a/ui/events/ozone/evdev/keyboard_evdev.cc
+++ b/ui/events/ozone/evdev/keyboard_evdev.cc
@@ -84,6 +84,14 @@ void KeyboardEvdev::OnKeyChange(unsigned int key, bool down) {
DispatchKey(key, down, false /* repeat */);
}
+void KeyboardEvdev::SetCapsLockEnabled(bool enabled) {
+ modifiers_->SetModifierLock(EVDEV_MODIFIER_CAPS_LOCK, enabled);
+}
+
+bool KeyboardEvdev::IsCapsLockEnabled() {
+ return (modifiers_->GetModifierFlags() & EF_CAPS_LOCK_DOWN) != 0;
+}
+
bool KeyboardEvdev::IsAutoRepeatEnabled() {
return repeat_enabled_;
}
« no previous file with comments | « ui/events/ozone/evdev/keyboard_evdev.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698