hotkeys

Emacs Ctrl modifiers don't work in console

蓝咒 提交于 2019-12-01 19:05:10
I have 2 hotkeys for dired, that work in GUI mode in Emacs: (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map (kbd "C-<up>") (lambda () (interactive) (find-alternate-file ".."))))) (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map (kbd "C-<right>") 'diredp-find-file-reuse-dir-buffer))) But when I click CTRL + → or CTRL + ↑ in console the cursor just moves as if the arrow was pressed. When I try CTRL + H K and then CTRL + → , it gives me the right key docs as if CTRL wasn't pressed at all. How to fix this strange behaviour in console? I am using Linux Slackware 14,

Listening for global key-combinations in python on Linux

有些话、适合烂在心里 提交于 2019-12-01 18:47:48
I just wrote a little program which downloads a new wallpaper from flickr every few minutes. Now I want to add the capability to "like" a wallpaper, so it will occur more often than non-liked or disliked wallpapers. I'd like to assign a global keyboard-shortcut to this function. For example: If I press ctrl+7, it would execute some kind of "like" function in Python. Are there any libraries for this (in JavaScript for example there's a library where I can define shortcuts with shortcut("ctrl-b", someFunction); ) Otherwise, how would I go round doing this? I've seen this similar SO question ,

jQuery Prevent Default Action Function Keys (F3, F4, etc.)

…衆ロ難τιáo~ 提交于 2019-12-01 13:19:49
I have this extremely basic example here: http://jsfiddle.net/arhVd/1/ <form> <input type="text"> <input type="submit"> </form> $(function () { $(document).keydown(function(e) { e.preventDefault(); $('form').submit(); }); }); I want to ensure that when pressing F4 it does not do the built in browser function (in F4's case set focus to the URL bar. Or perhaps F3 showing the 'Find' bar.) The functionality of submitting the form still works, I just don't want the browser functionality getting in the way. This is for an internal app where the function keys are supposed to function has HotKeys in

jQuery Prevent Default Action Function Keys (F3, F4, etc.)

≯℡__Kan透↙ 提交于 2019-12-01 11:23:12
问题 I have this extremely basic example here: http://jsfiddle.net/arhVd/1/ <form> <input type="text"> <input type="submit"> </form> $(function () { $(document).keydown(function(e) { e.preventDefault(); $('form').submit(); }); }); I want to ensure that when pressing F4 it does not do the built in browser function (in F4's case set focus to the URL bar. Or perhaps F3 showing the 'Find' bar.) The functionality of submitting the form still works, I just don't want the browser functionality getting in

Register hotkeys in Linux using library for c++

冷暖自知 提交于 2019-12-01 11:12:29
are there any libraries for Linux wrote with C++, that could register global hotkeys for my application? Thanks. You'll have to provide more information. In Gnome, the global functionality varies by window manager. Metacity has configurable global shortcuts, as do Compiz and Sawfish, and they're all configured differently. Xhotkeys can also be used for the same functionality. However, these are all limited to starting applications only. Within the KDE application framework, KAction can register global shortcuts which perform actions inside your program. These are actually handled by a module

How to capture global keystrokes with PowerShell?

浪尽此生 提交于 2019-12-01 10:44:59
问题 Can Powershell listen for and capture key presses? Is it possible to write a PowerShell script that, like AutoHotkey, sits in tray and waits until you press a predefined keyboard key to start execution? And possibly not return but fire every time you press said key? What I would like to achieve is - perform a predefined scripted action at the press of a button only AFTER starting the script, so putting it on the desktop and defining a shortcut key doesn't work. For example: I'd like the text

Register hotkeys in Linux using library for c++

故事扮演 提交于 2019-12-01 09:18:27
问题 are there any libraries for Linux wrote with C++, that could register global hotkeys for my application? Thanks. 回答1: You'll have to provide more information. In Gnome, the global functionality varies by window manager. Metacity has configurable global shortcuts, as do Compiz and Sawfish, and they're all configured differently. Xhotkeys can also be used for the same functionality. However, these are all limited to starting applications only. Within the KDE application framework, KAction can

Triggering Silverlight Prism command with a keyboard shortcut

怎甘沉沦 提交于 2019-12-01 06:59:00
问题 Does anybody know whether one can trigger prism command with a shortcut? What I mean is I want to be able to define binding of a command to keyboard shortcut in declarative manner, like ClientUI does: Are there any opensource libraries for that purpose? Or maybe code samples? I found this question but I don't think that it answers mine. 回答1: I've created such gesture trigger. And I'd like to share it with you guys. Basically, it is System.Windows.Interactivity trigger which can parse gestures

How to emulate pressing media keys in Java?

一曲冷凌霜 提交于 2019-12-01 05:23:24
How can I emulate pressing media keys in Java? Such as play/pause, next/previous, volume control. C# has VK_MEDIA_PLAY_PAUSE , VK_MEDIA_NEXT_TRACK and so on. Java has class Robot for working with keys, but there are no media keys. I used the JNI Library to simulate the key presses using code written in C. I've created a .dll file and .java file for hitting the "Volume Down", "Volume Up", "Volume Mute", "Previous Track", "Next Track", and "Play/Pause Track" media keys. Here is a link to the full repository, however, I will explain it in more detail below. MediaKeys.java must be in a package

Global hotkey release (keyup)? (WIN32 API)

烈酒焚心 提交于 2019-12-01 03:39:55
Is there a way to notice the release of a hot-key button registered with RegisterHotKey ? I get a WM_HOTKEY message every time I press the hot-key but I need to know when the key was released There is no specific notification for that specific action. You will have to write a DLL that implements a global keyboard hook via SetWindowsHookEx() , then you will receive individual keypress up/down notifications and can match them up to your WM_HOTKEY notifications as needed. Use RegisterHotkey to detect the key going down, then use polling with GetAsyncKeyState until the key is no longer down. This