Making a capital letter with a shift modifier press and hold option with Keyboard Maestro - keyboard-maestro

I have been using Autoit for years and I have just discovered Keyboard Maestro for Mac and it's AWESOME!
Here is my problem. I need to simulate pressing the SHIFT + 1 key. Here are the steps
Press and Hold the Shift Key
Push and Release the 1 Key
Release the Shift Key
Pretty simple but for some reason it is not working. I am testing it out with the letter "a" instead of 1 because if it worked then it would create the capital letter "A".
How can I get this to produce a capital letter A by using the Shift Modifier?
Here is a screenshot of my macro

In "Simulate Keystroke", just hold down Shift+1. It will put that in as the keystroke combo, not the ! symbol.
Shift-1 example

Related

Re-enable right-Ctrl when using Canadian Multilingual Standard keyboard for my AutoHotkey function?

I have an Autohotkey function that lets me switch between tabs with "Control + left/right" as well as closing tabs (Ctrl-down) and going into the search bar (Ctrl-up). It helps me save clicks and use the mouse less.
However, I use the Canadian Multilingual Standard keyboard to type accents (éèçà) in French for some of my classes and this keyboard DISABLES the right control key (the one right beside my keyboard buttons) which is the most convenient to use with my right hand only.
Here is a source documenting this: http://archives.miloush.net/michkap/archive/2013/04/08/10409187.html
Is there any way I can override this? I very rarely use the letter œ for because I can just use ALT + 0156 instead.
Here is the very simple code for my hotkey!
^Left::SendInput, ^{PGUP}
^Right::SendInput, ^{PGDN}
^Up::SendInput, !d
^Down::SendInput, ^w
Using SciTE4AutoHotkey tool, on my UK hardware keyboard right ctrl is detected as expected (RControl)
When I switch to French (Canada) Canadian Multilingual keyboard,
the right ctrl key is not found, also Virtual Key is different: DF
(SC means scan code and VK means virtual key)
so if you remap, it should solve the problem
~SC11D::RControl
After remapping: not found is replaced by RControl with each keypress.
Even if above remapping does not work for your case, it is a matter of finding which key corresponds to relevant scan code and then you can remap it.
Double click on your ahk script on the taskbar, and then
View > Key history and script info (Ctrl + K) by pressing key and refresh(F5) you can see respective keyboard scan codes.

How do read DrRacket keybindings (and in general)

I have never been able to understand keybinding syntax well (bc it's hard to google if you don't know the name of a symbol to begin with!).
In DrRacket, I see bindings like "c:g" or "esc;g" .. I have tried hitting those keys in order to no avail. I have tried hitting them simultaneously. Nothing seems to work.
What do they mean? And, in general, how does one go about understanding this syntax?
A generic shortcut:
<modifier-key-1>:<key-1>;<modifier-key-2>:<key-2>;...;<key-n>
means:
press both <modifier-key-1> and <key-1> (that is: start pressing the modifier key, and while it is pressed, press key-1, then release both),
then, immediately, perform the same operation for the remaining combinations of keys,
finally, press <key-n>
Where the standard modifier keys are:
c - the control key modifier
s - the shift key modifier
m - the meta key modifier (not present in many keyboards)
a - the alt key modifier (sometimes already used to insert special characters)
(actually there are other key modifiers in different keyboards).
So, c:x;c:g;s:t means the following combination: Control-X, followed by Control-g, followed by Shift T (this insert Σ, the greek uppercase letter sigma in DrRacket), while c:x;c:g;s means Control-X followed by Control-G followed by the key s (insert the greek letter ς). Finally, the combination m-c-right means press both the modifier keys Meta and Control with the right arrow key.
When the meta modifier key is not present, it is often replace by the ESC (escape) key. Since this is not a key modifier, but a regular key, in this case it must be pressed and released before the next character. In other words, esc:g means: press the ESC key, release it, then immediately press the regular G key. esc-c-right means: press ESC, release it, then press C-→.
Moreover, when the ALT key is already used by the operating system to insert special characters, like in Mac OS X, it can be used as regular modifier key in DrRacket by setting a special preference (in Preferences > Editing > General).
In DrRacket you can find the current keybinding with the menu item: Edit > Keybindings > Show Active Keybindings, and you can find the relevant documentation here.

Bind keyboard shortcut to one key in AutoHotkey with delay

I am using the Japanese IME on Windows 10. TL;DR there is a shortcut to switch from alphanumeric (latin alphabet) to Japanese input. The combination is ALT+` [l or r alt + tilde key]. For it to work, both keys must be held down but the alt key must be pressed first. I am trying to bind this combination to one key.
I have been able to bind normal letter keys to a combination of other letters (e.g. a -> b + c) but I cannot get it to work with the keys I need, and especially not because there needs to be a delay between them. The code confuses me.

How to remap C-x prefix in emacs to a dedicated key?

Many emacs commands start with C-x or C-c. I found that I never use the right shift key. So I was thinking if it's possible to remap C-x to Shift. To open a file, I can do Shift-Ctrl-f instead of C-x C-f. Here I would prefer Shift-Ctrl-f than Shift Ctrl-f.
The link created by SSH between machines does not transmit the pressing and releasing of the shift key; only when another key is pressed in conjunction with Shift is a character transmitted, and the character — upper case H when Shift and “h” have been pressed, for example — looks the same to the remote machine whether left or right shift was used.
Therefore, to make right Shift visible, you will have to tell the terminal program to consider it to be a different key — or maybe even have to tell the Mac system settings that it is no longer Shift?
Is it possible to explain to your Mac that pressing Shift sends the character Control-X? That would kill both birds with one stone!

How to make both Alt keys work same way

I have some mappings that uses Alt key on Windows XP. While they work fine with
the left Alt, they doesn't with the right Alt key.
For example, the following mapping does nothing when I press right_Alt+b,
while it display a message box when left_Alt+b is pressed.
!b::MsgBox You pressed Alt+b.
I'd like to have both Alt keys to work the same way and trigger the mapping
above.
The mapping below does works with right Alt key, but doesn't works with left
Alt key:
<^>!b::MsgBox You pressed right Alt+b.
One workaround would be duplicate all mappings that contains the alt key, but
that would significantly increase the size of some scripts. Besides, I found
that in some cases it doesn't works. Further investigation showed that the
right alt key has a strange behavior. In a script containing only the
following mapping,
^!b::MsgBox You pressed Ctrl+Alt+b.
, the message box is displayed when right_Alt+b is pressed.
I've tried to map right Alt to left Alt,
<^>!::!
or
<^>!::Send {ALT}
, but it didn't solve the problem.
You mention that you tried to map the Right-Alt to Left-Alt, but not HOW you did this. Anyway, when I use this:
RAlt::LAlt
MsgBox You pressed Alt+b. is executed when I press Right-Alt+b AND Left-Alt+b.
Can you tell how you tried to map the two Alt keys?
I write this comment as an answer because of the better formatting options.
Here is the script I used in AutoHotKey_L (1.1.09.01), should work the same in regular AutoHotKey.:
RAlt::LAlt
<^>!b::MsgBox, A You pressed right Alt+b.
^!b::MsgBox, B You pressed Ctrl+Alt+b.
Test 1: pressed Ctrl+LAlt+b. Result: MsgBox B, normal behaviour
Test 2: pressed Ctrl+RAlt+b. Result: MsgBox B, expected due to the re-mapping
Commented the ;^!b::MsgBox, B... out and tested again.
Test 3: pressed Ctrl+RAlt+b. Result: Nothing, as expected
Commented ;RAlt::LAlt out and tested again:
Test 4: pressed Ctrl+RAlt+b. Result: MsgBox A, expected since no more re-mapping.
Last but not least. There is NO difference in behaviour if I press Ctrl+RAlt+b or RAlt+Ctrl+b. One more note: I always used the LEFT Ctrl key, not the RIGHT Ctrl key.
Are you NOT getting these results?
Or are you expecting different results when you make RAlt equal to LAlt?