diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-24 10:48:34 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-11-24 10:48:34 +0100 |
| commit | 98eada369aa50115e677a1b337662fee9f0ca011 (patch) | |
| tree | 6855bc602c4da5f6a13c90276452b438172c1d3d /src/Input/KeyEventArgs.cs | |
| parent | 4db409fdff013e3e4249d567e4d6fdb0ee877256 (diff) | |
debug log viewer, X backends
Diffstat (limited to 'src/Input/KeyEventArgs.cs')
| -rw-r--r-- | src/Input/KeyEventArgs.cs | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/Input/KeyEventArgs.cs b/src/Input/KeyEventArgs.cs new file mode 100644 index 00000000..510e68a0 --- /dev/null +++ b/src/Input/KeyEventArgs.cs @@ -0,0 +1,64 @@ +#region License +// +// The Open Toolkit Library License +// +// Copyright (c) 2006 - 2009 the Open Toolkit library. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Crow +{ + public class KeyEventArgs : EventArgs + { + int keyCode; + Key key; + bool repeat; + + public KeyEventArgs(Key _key, bool _repeat) + { + key = _key; + repeat = _repeat; + } + public KeyEventArgs(KeyEventArgs args) + { + Key = args.Key; + } + public Key Key + { + get { return key; } + internal set { key = value; } + } + public uint ScanCode + { + get { return (uint)Key; } + } + public bool IsRepeat + { + get { return repeat; } + internal set { repeat = value; } + } + } +} |