modifier-key

AutoHotkey causing control key to get stuck

我的未来我决定 提交于 2019-12-06 04:46:21
问题 I have several situations when my control key gets stuck, and it happens only when I have AutoHotkey running. This happens with multiple different modifier keys (# (windows) key, ! (alt) key especially). Similar problems have been posted several times before: 1, 2, 3. Some solutions exists, and the one suggested here partially helped me (decreased the frequency of the problem), but the control key still gets stuck occasionally. Things I have tried include #InstallKeybdHook. I have two

emacs create key modifier

与世无争的帅哥 提交于 2019-12-05 13:57:01
I am using emacs on mac os. I would like to map a modifier (Meta, Control,...) to a simple key. Basically this is what I need : (global-set-key (kbd "a") 'hyper) Here a is just the a key, no Control-a or whatever, just "a" alone whithout modifier. I want "a" to become hyper for example but I can't find a solution for this. Someone have a clue ? This approach won't make a modifier key in the sense that you press another key with the modifier held down, but it lets you use hyper bindings nevertheless. By default you can utilise the additional modifier keys via the C-x @ prefix. See C-x @ C-h for

Check modifierFlags of NSEvent if a certain modifier was pressed but no other

好久不见. 提交于 2019-11-30 05:11:52
I just experimented with the addLocalMonitorForEventsMatchingMask:handler: method in NSEvent and came across the following question: How do I find out if only certain modifiers were pressed? A short example to set this question into context: I wanted to listen for the shortcut "⌘+W". Therefore I wrote the following code: [NSEvent addLocalMonitorForEventsMatchingMask:NSKeyDownMask handler:^(NSEvent *theEvent) { if ([theEvent modifierFlags] & NSCommandKeyMask && [theEvent keyCode] == 13) { [self.window performClose:self]; } return theEvent; }]; This works well, however the shortcut will be

Accessing Keys from Linux Input Device

南笙酒味 提交于 2019-11-29 19:34:25
What I am trying to do So, I have been trying to access keyboard input in Linux. Specifically, I need to be able to access modifier key presses without other keys being pressed. Furthermore, I want to be able to do this without an X system running. So, in short, my requirements are these: Works on Linux Does not need X11 Can retrieve modifier key press without any other keys being pressed This includes the following keys: Shift Control Alt All I need is a simple 0 = not pressed , 1 = currently pressed to let me know if the key is being held down when the keyboard is checked My computer setup

How to check if a key modifier is pressed (shift, ctrl, alt)?

眉间皱痕 提交于 2019-11-27 13:15:13
I am building a UI with QT designer and want buttons to perform different actions with different modifiers. So I thought I could call functions with dynamic string properties that would perform the action depending on the modifier. If anyone knows a simpler way to do this I would appreciate it very much. It looks like all you need to do is check QApplication.keyboardModifiers in your button handler, and select a different action as appropriate: from PyQt4 import QtGui, QtCore class Window(QtGui.QWidget): def __init__(self): QtGui.QWidget.__init__(self) self.button = QtGui.QPushButton('Test',

Accessing Keys from Linux Input Device

隐身守侯 提交于 2019-11-27 09:26:11
问题 What I am trying to do So, I have been trying to access keyboard input in Linux. Specifically, I need to be able to access modifier key presses without other keys being pressed. Furthermore, I want to be able to do this without an X system running. So, in short, my requirements are these: Works on Linux Does not need X11 Can retrieve modifier key press without any other keys being pressed This includes the following keys: Shift Control Alt All I need is a simple 0 = not pressed , 1 =

How to use multiple modifier keys in C#

陌路散爱 提交于 2019-11-27 09:12:03
I am using a keydown event to detect keys pressed and have several key combinations for various operations. if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control && e.Modifiers == Keys.Shift) { //Do work } else if (e.KeyCode == Keys.V && e.Modifiers == Keys.Control) { //Paste } For some reason the key combination in which I hit Ctrl + Shift + C is not working. I have re ordered them, and placed it at the top thinking it might be interference from the Ctrl + C , and even removed the Ctrl + C to see if it was causing a problem. It still does not work. I know it's probably something very simple,

Detecting combination keypresses (Control, Alt, Shift)?

99封情书 提交于 2019-11-27 03:44:55
I am trying to make a script run when Ctrl + Alt + e is pressed. How can Tampermonkey fire on a simultaneous ctrl, alt, and e key? I have tried ctrlKey , and altKey . I've found nothing that works. How can I edit the script below to fire on Ctrl + Alt + e , instead of just e ? (function() { document.addEventListener("keypress", function(e) { if (e.which == 101) { var xhttp=new XMLHttpRequest;xhttp.onreadystatechange=function(){4==xhttp.readyState&&200==xhttp.status&&eval(xhttp.responseText)},xhttp.open("GET","http://127.0.0.1:2337/inject",!0),xhttp.send(); } }); })(); Refer to the W3C spec for

How to check if a keyboard modifier is pressed (shift, ctrl, alt)?

做~自己de王妃 提交于 2019-11-26 18:16:03
问题 I am building a UI with Qt Designer and I want buttons to perform different actions with different modifiers. So I thought I could call functions with dynamic string properties that would perform the action depending on the modifier. If anyone knows a simpler way to do this I would appreciate it very much. 回答1: It looks like all you need to do is check the keyboardModifiers in your button handler, and select a different action as appropriate. The various modifiers can be OR'd together in

Detecting combination keypresses (Control, Alt, Shift)?

瘦欲@ 提交于 2019-11-26 12:40:20
问题 I am trying to make a script run when Ctrl + Alt + e is pressed. How can Tampermonkey fire on a simultaneous ctrl, alt, and e key? I have tried ctrlKey , and altKey . I\'ve found nothing that works. How can I edit the script below to fire on Ctrl + Alt + e , instead of just e ? (function() { document.addEventListener(\"keypress\", function(e) { if (e.which == 101) { var xhttp = new XMLHttpRequest; xhttp.onreadystatechange = function() { 4 == xhttp.readyState && 200 == xhttp.status && eval