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

Unified Diff: remoting/client/normalizing_input_filter_win.h

Issue 2900203002: Moving input filter files and keymap to input directory. (Closed)
Patch Set: Fix include for input. Created 3 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
Index: remoting/client/normalizing_input_filter_win.h
diff --git a/remoting/client/normalizing_input_filter_win.h b/remoting/client/normalizing_input_filter_win.h
deleted file mode 100644
index 490adc4aec4b37d267218b34f982bf8f080dfbb9..0000000000000000000000000000000000000000
--- a/remoting/client/normalizing_input_filter_win.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_WIN_H_
-#define REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_WIN_H_
-
-#include "base/macros.h"
-#include "remoting/proto/event.pb.h"
-#include "remoting/protocol/input_filter.h"
-
-namespace remoting {
-
-// NormalizingInputFilterWin works around a quirk in Windows' handling of the
-// AltGr key. When using a layout that treats RightAlt as AltGr, Windows
-// generates the following for an AltGr keydown/keyup cycle:
-//
-// keydown LeftControl
-// keydown RightAlt
-// keyup LeftControl
-// keyup RightAlt
-//
-// In a layout without AltGr the key will generate only RightAlt events.
-//
-// This filter captures LeftControl keydown events and defers them until
-// some other event occurs; if the next event is a RightAlt keydown then
-// the LeftControl is ignored and neither keydown nor keyup will be sent
-// for it.
-class NormalizingInputFilterWin : public protocol::InputFilter {
- public:
- explicit NormalizingInputFilterWin(protocol::InputStub* input_stub);
- ~NormalizingInputFilterWin() override;
-
- // InputFilter interface.
- void InjectKeyEvent(const protocol::KeyEvent& event) override;
- void InjectMouseEvent(const protocol::MouseEvent& event) override;
-
- private:
- void ProcessKeyDown(const protocol::KeyEvent& event);
- void ProcessKeyUp(const protocol::KeyEvent& event);
-
- // Sends the |deferred_control_keydown_|, if any, and clears it.
- void FlushDeferredKeydownEvent();
-
- // Holds the keydown event for LeftControl immediately after it has been
- // pressed, until we have determined whether it is part of AltGr.
- protocol::KeyEvent deferred_control_keydown_;
-
- // True if LeftControl is pressed and treated as LeftControl.
- bool left_control_is_pressed_ = false;
-
- // True if LeftControl is pressed as part of AltGr.
- bool altgr_is_pressed_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(NormalizingInputFilterWin);
-};
-
-} // namespace remoting
-
-#endif // REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_WIN_H_
« no previous file with comments | « remoting/client/normalizing_input_filter_mac_unittest.cc ('k') | remoting/client/normalizing_input_filter_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698