Modify stylus behavior in any tablet - autohotkey

I just read this post about there being no way to fully use the stylus buttons, nor movements:
http://www.autohotkey.com/board/topic/91828-stylus-middle-mouse-button-emulation/
And I think that there should be some available workaround for this by now.
To clearly state my question: Is there a way to use AutoHotkey (or other program) to modify the stylus buttons (including the on screen actions like click and hold) in a similar fashion as the keyboard?
An example of what I am looking for in AutoHotkey is to be able to press pen against screen and at the same time click any button as a hotkey using e.g. GetKeyState.

One suboptimal workaround that I know for this is to use something like these: http://alternativeto.net/software/strokesplus/
And have them send some keyboard combination as output, which AutoHotkey can act on. This would probably work, but would require another program, and essentially make AutoHotkey redundant for the most basic things. Once you add GetKeyState etc functionality from AutoHotkey the two together should make for a vast amount of possible combinations not possible by either alone though.

Related

Keybindings with mouse click

I am developing in C#, and when I hold down cmd (macOS) and Click a method, I am taken to it's Definition. I am looking for a way to be able to hold down cmd+shift and click the method, and be taken to the methods Implementation. I have searched and tested for some time without finding anything; I am starting to think it is not possible.
Does anyone know how, or if it even is possible?
It's currently impossible. Mouse clicks are not considered modifiers and cannot be customized right now. There's an open issue for this: https://github.com/microsoft/vscode/issues/3130.
You can still press command+F12 to jump to Implementation (which may be unhandy, since you have to press Fn as well). Besides, some applications or specific mouses allow you to map keys.

External/USB controller integrated with Eclipse

I own an APC MINI USB/MIDI button pad and have been trying to get windows to more or less recognize it as a operating-system-wide input device. My primary use case is to trigger macros or shortcuts in Eclipse.
For example, instead of the current keybinding of ALT+] to clone a window I could press [btn_1] on the external controller to trigger the action. Another example is I could move the slider up and down changing the zoom on my text.
Ideally I'll be able to fire off any macro or shortcut just by pressing a button on the USB pad. If I could get it working at the OS level, I could see having a row of buttons start or focus frequently used applications. For example be able to open FireFox or press a button to navigate a tab to StackOverflow.com.
I supposed I COULD slap together a quick jar with a Midi library, listen for input from the device and map the "notes" (button presses) to a key combination/shortcut but I feel like there has got to be a way to have windows treat the pad as an input device just like a mouse or keyboard. Been all over the internet looking for solutions but most use cases deal with software engineered to handle midi input. Not afraid to write .bat files to cooperate with windows but still need some way to link the buttons on my board to said .bat files.
Any ideas or suggestions would be greatly appreciated!

What's the keyboard shortcut for filtering CSS Rules in chrome dev tools?

I'm looking around their shortcuts page but can't seem to find the shortcut to filter different CSS Rules.
Does anyone know how I can access it? In my experience sometimes these things don't get documented, and would be helpful if anyone can clarify.
Shortcuts Link
I want to be able to access this area here:
Thanks
I had a quite look at the source code and there doesn't appear to be a shortcut key combination for that. You can, of course, put in a feature request for one to be implemented. However, we'd have to consider what shortcut would be appropriate to use.
There's an alternative shortcut in terms of tab indexes in the Elements panel. By default, when you go to Elements, the body element is expanded. If you have no links in the outer elements inside the body, you only have to press the tab key twice to get to the style filter. If you have links, then it may be a few more times. However, you can press the left keyboard shortcut once to collapse the body, then tab twice. This means for the use case of just coming into the Elements panel (i.e. you haven't already been playing around in it), using left>tab>tab could be good enough.

How to write a command line interface in Swift 4 with features similar to Unix man pages?

For example; go ahead and open a terminal window and type:
man ls
Have a look around; notice that you can move up and down through text with the arrow keys and that the terminal history is now missing.
Use "q" to quit.
The terminal history is now returned.
I'm trying to understand how to write an interface that does the above: with the terminal history disappearing and reappearing on exit and most importantly with the interface being able to take key presses as input instead of using readLine().
On the screen clearing front I've managed an ANSI escape code:
print("\u{001B}[2J")
Which clears the screen and starts the cursor from the bottom but is only really implementing newlines and pushing the old content off the screen unlike the man pages which remove the scrollable history. So currently not what I'm trying to achieve.
As for taking key presses as input, I haven't been able to find much but Foundation has 3 references to:
standardInput
The Developer Documentation lists them in FileHandle, NSUserUnixTask & Process. I'm hoping perhaps one of them may be able to listen for key presses and then respond with a notification that I can use to update my interface with the correct screen clear and repositioning of text or perform an action (like quitting and returning to the normal prompt as "man" does with the press of "q").
Would love to have some help on this one, thanks!
The standard macOS Cocoa GUI uses events; representing mouse clicks, keyboard presses, etc.; to communicate user input to your app. Read up on event handling and you can make your app quit which the user types a "q". That is the underlying mechanism for keyboard input and the alternative to your readLine().
However what you are describing is more involved than just key press handling, you want terminal-like screen control; scrolling backwards, clearing the screen, etc. The original way of doing this on Unix was to use low-level tty device interfaces and issue control codes the screens themselves understood. The modern was is often to implement these same control codes in your Cocoa interface, this allows the output of the standard Unix-level commands; e.g. man et al; to be interpreted. This is what Terminal.app does. The standard Cocoa text controls also implement support for some of this, in particular a subset of Emacs-style cursor movement is supported.
The open source iTerm2 is an Objective-C alternative to Terminal.app, the source is available on GitHub. If you read this you can learn how to implement a terminal window interface in Cocoa in Objective-C, you'll have to figure out the Swift equivalent.
HTH

Macro Keys not Detected AutoHotkey

I have just purchased the Steelseries apex gaming keyboard and rival mouse. Unfortunately, each of these products has different software for macros and keyboard lighting, both of which are mediocre at most.
Instead of having 2 processes running in the background and having to use 2 crappy programs to write my macros, I have decided to use AutoHotkey for my macros, some of which I plan on making quite complex. The mouse was no problem in AutoHotkeys, with the two side buttons using XButton1 and XButton2, however no matter what I do, I can't detect my keyboard macro keys (M1 to M12 and MX1 to MX10).
Using a keyboard hook doesn't detect any keys, and looking online I can't find how to reference these keys either. I'm not even sure windows sees them, as when I try to input them into the shortcut key field in a normal shortcut they do nothing. So my questions are:
What is the name for the macro keys on my keyboard in AutoHotkey?
Is there any way to work around this problem without having to use the Steelseries Engine?
If I can't access them normally, is there a way to reassign them without external software?
(Optional) Is there any way to adjust the lighting on the keyboard and mouse without the Steelseries software as well?
Btw I'm using Windows 8 and here are the links to the mouse and keyboard. Thank you in advance.
You can get the name for special keys that are not listed in AutoHotkey documentation by following steps here.
Some notes and explanations:
You can use that script for step 1:
#InstallKeybdHook
Sleep, 99999999999999999999
When you run it, check if keyboard hook is active by:
press here:
then here:
and if active, you should see something like here:
In the step 6 the hex value column is here:
If that is not working for you, try Alternate solutions in the link that I provided before.