当前位置: 首页>>代码示例>>C#>>正文


C# KeyModifiers类代码示例

本文整理汇总了C#中KeyModifiers的典型用法代码示例。如果您正苦于以下问题:C# KeyModifiers类的具体用法?C# KeyModifiers怎么用?C# KeyModifiers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


KeyModifiers类属于命名空间,在下文中一共展示了KeyModifiers类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PencilKeyInfo

 public PencilKeyInfo(Pencil.Gaming.Key key, int scancode, KeyAction action, KeyModifiers modifiers)
 {
     Key = key;
     Scancode = scancode;
     Action = action;
     Modifiers = modifiers;
 }
开发者ID:prepare,项目名称:three.net,代码行数:7,代码来源:PencilGamingWindows.cs

示例2: HotKeyEventArgs

 public HotKeyEventArgs(IntPtr hotKeyParam, IntPtr wParam)
 {
     uint param = (uint)hotKeyParam.ToInt64();
     Key = (Keys)((param & 0xffff0000) >> 16);
     Modifiers = (KeyModifiers)(param & 0x0000ffff);
     this.ID = (int)wParam;
 }
开发者ID:freshprogrammer,项目名称:FreshTools,代码行数:7,代码来源:HotKeyManager.cs

示例3: RegisterHotkey

 public int RegisterHotkey(Keys key, KeyModifiers keyflags)
 {
     UInt32 hotkeyid = Win32.GlobalAddAtom(System.Guid.NewGuid().ToString());
     Win32.RegisterHotKey((IntPtr)hWnd, hotkeyid, (UInt32)keyflags, (UInt32)key);
     keyIDs.Add(hotkeyid, hotkeyid);
     return (int)hotkeyid;
 }
开发者ID:Tricoro,项目名称:OSUplayer,代码行数:7,代码来源:Win32.cs

示例4: RegisterHotKey

    public void RegisterHotKey(KeyModifiers keyModifiers, uint key)
    {
        if(hotKeySet)
            UnregisterHotKey();

        hotKeySet = User32_RegisterHotKey(Handle, 100, keyModifiers, key);
    }
开发者ID:atroxaper,项目名称:pushtotalk,代码行数:7,代码来源:hotkeyform.cs

示例5: KeyboardInput

 /// <summary>
 /// Initializes a new instance of the <see cref="FreezingArcher.Input.KeyboardInput"/> class.
 /// </summary>
 /// <param name="key">Key.</param>
 /// <param name="scancode">Scancode.</param>
 /// <param name="action">Action.</param>
 /// <param name="modifier">Modifier.</param>
 public KeyboardInput (Key key, int scancode, KeyAction action, KeyModifiers modifier)
 {
     Key = key;
     Scancode = scancode;
     Action = action;
     Modifier = modifier;
 }
开发者ID:AreonDev,项目名称:NoWayOut,代码行数:14,代码来源:KeyboardInput.cs

示例6: RegisterHotKey

 public static int RegisterHotKey(Keys key, KeyModifiers modifiers)
 {
     _windowReadyEvent.WaitOne();
     int id = System.Threading.Interlocked.Increment(ref _id);
     _wnd.Invoke(new RegisterHotKeyDelegate(RegisterHotKeyInternal), _hwnd, id, (uint)modifiers, (uint)key);
     return id;
 }
开发者ID:mikhailshilkov,项目名称:FsPokerLogic,代码行数:7,代码来源:HotkeyManager.cs

示例7: GlobalHotKey

 public GlobalHotKey(KeyModifiers modifiers, Keys key)
 {
     if (!RegisterHotKey(this.Handle, ID, modifiers, key))
     {
         Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
     }
 }
开发者ID:DeCarabas,项目名称:pwlet,代码行数:7,代码来源:GlobalHotkey.cs

示例8: AssertMapping

 private void AssertMapping(KeyState keyState, string text, KeyModifiers modifiers = KeyModifiers.None)
 {
     VimKeyData vimKeyData;
     Assert.True(_keyStateToVimKeyDataMap.TryGetValue(keyState, out vimKeyData));
     Assert.Equal(text, vimKeyData.TextOptional);
     Assert.Equal(modifiers, vimKeyData.KeyInputOptional.KeyModifiers);
 }
开发者ID:kcprogrammer,项目名称:VsVim,代码行数:7,代码来源:KeyboardMapBuilderTest.cs

示例9: VerifyConvert

 private void VerifyConvert(VSConstants.VSStd2KCmdID cmd, KeyModifiers modifiers, KeyInput ki, EditCommandKind kind)
 {
     EditCommand command;
     Assert.True(OleCommandUtil.TryConvert(VSConstants.VSStd2K, (uint)cmd, IntPtr.Zero, modifiers, out command));
     Assert.Equal(ki, command.KeyInput);
     Assert.Equal(kind, command.EditCommandKind);
 }
开发者ID:aesire,项目名称:VsVim,代码行数:7,代码来源:OleCommandUtilTest.cs

示例10: HotKey

 public HotKey(int id, KeyModifiers modifiers, Keys key, EventHandler<HotKeyEventArgs> genericHandler)
 {
     this.Id = id;
     this.Modifiers = modifiers;
     this.Keys = key;
     this.Handler = null;
     this.GenericHandler = genericHandler;
 }
开发者ID:freshprogrammer,项目名称:FreshTools,代码行数:8,代码来源:HotKeyManager.cs

示例11: HotKey

		public HotKey(int _keyID, Keys _key, KeyModifiers _modifier, EventHandler hotKeyPressed)
		{
			keyID = _keyID;
			HotKeyPressed = hotKeyPressed;
			key = _key;
			modifier = _modifier;
			Start();
		}
开发者ID:TargetProcess,项目名称:Tp.TrayUtility,代码行数:8,代码来源:HotKey.cs

示例12: RegisterHotKey

        public static extern bool RegisterHotKey( 
            IntPtr hWnd, 
 
            int id, 
            KeyModifiers fsModifiers, 
 
            Keys vk 
 
            ); 
开发者ID:NitroXenon,项目名称:LoLSpectX,代码行数:9,代码来源:Function.cs

示例13: RegisterHotKey

 public static extern bool RegisterHotKey(
     //要定义热键的窗口的句柄
     IntPtr hWnd,
     //定义热键ID(不能与其它ID重复)
     int id,
     //标识热键是否在按Alt、Ctrl、Shift、Windows等键时才会生效
     KeyModifiers fsModifiers,
     //定义热键的内容
     Keys vk
     );
开发者ID:eyuan,项目名称:CommentGenerator,代码行数:10,代码来源:HotKey.cs

示例14: CreateKeyInput

 internal static KeyInput CreateKeyInput(
     VimKey key = VimKey.NotWellKnown,
     KeyModifiers mod = KeyModifiers.None,
     char? c = null)
 {
     return new KeyInput(
         key,
         mod,
         c.HasValue ? FSharpOption<char>.Some(c.Value) : FSharpOption<char>.None);
 }
开发者ID:otf,项目名称:VsVim,代码行数:10,代码来源:VimUtil.cs

示例15: Hotkey

        public Hotkey(IntPtr handle, int id, KeyModifiers modifiers, Keys key)
        {
            if (key == Keys.None || modifiers == KeyModifiers.None) throw new Exception();

            Handle = handle;
            ID = id;
            Modifiers = modifiers;
            Key = key;
            RegisterHotKey();
            Application.AddMessageFilter(this);
        }
开发者ID:stoicshark,项目名称:silkyshark,代码行数:11,代码来源:Hotkey.cs


注:本文中的KeyModifiers类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。