Multiple keystrokes as autohotkey shortcut - autohotkey

I'm new to AutoHotkey.
I have a specfic need to be achieved in Powerpoint using autohotkey.
Let's say in Powerpoint, I want to change font color.
The normal steps are:
Select the text
Click "Home" > Click "Font Color" > The Font palette gets expanded and I select the color.
Now, I want to make this process quicker as below
Select the text
Press FC (as shortcut from keyboard) and autohotkey should press the following keys Alt+H+FC (Very importantly, if I don't press C immediately after F, then it should get typed as replaced text of highlighted text)
So, my code goes as like this
#SingleInstance, Force
#IfWinActive ahk_exe POWERPNT.EXE ; check whether ppt is the active window
f::
#if keypress c
send, !HFC
#if
return
But, this doesn't work.
I don't where am I making mistake. Could someone help, please

I know this is an autohotkey question, but the quick access toolbar (QAT) in PowerPoint may solve your problem out of the box.
The QAT assigns Alt+1 to the first feature, alt+2 to the second, etc. By customizing the order of buttons on the QAT, you can access features you use often with one key combination.
Instructions
First add the font color button to the QAT: right click the 'font color' button, and click 'add to quick access toolbar'
Change the order of features in the QAT: right click on the QAT - customize quick access toolbar). Use the arrow buttons on the right side to change the ordering.
This is the order I use myself:
This allows me to very quickly align objects on a slide, change background color, outline, and text color, all initiated from the keyboard.

Related

How i can change highlighted area in VSCode after Shift+F12

I try to find hotkey which can help me to change selected area after shift+f12.Let's see example:
I selected this function and after it i click shift+f12 and watch this in special window:
And as you can see, the right side of this block is displayed - all the places where this function is found.
I want to know what hotkey I need to press to move to the area with the code and start editing it:
Please say me how i can make it without mouse:)
P.S. i'm using windows

Access mouse over hover in VSCode

Is there a way to access the mouse over popup in VSCode via Keyboard and navigate in it?
I often use the mouse over to get the namespace of function or variable ...
So I want to place the cursor on "bar", popup the hover (Show Hover Ctrl+k Ctrl+i), focus it, mark some text (eg. namespace::functioname), copy and close the hover.
namespace foo{
void bar();
}
First problem, the hover doesn't get the focus and I don't know how to focus it. But there is another feature "Show defintion preview hover", which actually gets focused. So far so good. But I still cannot mark or copy text inside the hover via keyboard.
Show hover (not focused):
Show definition preview hover (focused):
But I still cannot mark or copy text inside the hover via keyboard.
That should change with VSCode 1.68 (May 2022):
Lock hovers to more easily mouse over them
Some custom hovers cannot be moused over and others are tricky to mouse over without hiding it because of other things in the way (eg. like a scroll bar).
Holding alt while a hover is active will now "lock" it, giving it a wider border and preventing moving the mouse outside of the hover widget or whatever triggered it from hiding it.
This is primarily an accessibility feature to make hovers play nice with screen magnifiers but it is also useful for copying text from certain hovers.
Note that this feature only applies outside of the editor because editor hovers can always be moused over unless specified otherwise via a setting.
This will be helpful for other views (debug, terminal, ...) where variables with their popup can appear as well.
In the editor, see microsoft/vscode issue 63296
ctrl+K ctrl+I to show the hover and focus it
ctrl+A to select all the hover content
ctrl+C to copy to clipboard
It does indeed work for me (on windows) for the first two steps, however ctrl+C does not copy the text selected with ctrl+A.
It seems like there are two different selections possible in the hover:
ctrl+Aselects everything with a dark blue.
When selecting some text in the hover with the mouse (i.e. press the left mouse button while near/over a char, move mouse, release left mouse button) the selected text is shown in a lighter and brighter blue.
The two selections can coexist.
ctrl+C always copies the text selected with the mouse, or nothing if there's no such selection, no matter whether a ctrl+A selection also has been done.
If there's only a ctrl+A selection, ctrl+C doesn't copy anything.
The two selections can be selected in any order. The order doesn't change the behavior.
Think I found out what you were after.
The shortcut is: Ctrl+K Ctrl+I
See: Trigger advanced hover information with keyboard
please try control + mouse click
it may be help you

VSCode: Disable mouse+ctrl interaction

I often double-click to select followed by ctrl+c to copy. I am finding in vscode that ctrl press with the mouse over a word can perform an action. In some cases it selects the whole line, and in others it jumps to the definition of what is underneath. Is there a way to turn this off?
Note that if you move the mouse cursor off the word then it appears the action is not performed.
You could click on Visual Studio code->Preferences->KeyBoard Shortcuts. Keyboard Shortcuts page opens up. You could change any of the keyboard short cuts, by click on edit icon on the left as shown below
You can change the behavior of these features or disable them altogether by going to Tools > Options > Text Editor.
https://devblogs.microsoft.com/cppblog/productivity-structure-visualizer-ctrl-click-to-go-to-definition/

In notepad++ change tab size instantly

I'm using notepad++ (v6.5.3) and I constantly have to change the size of the tab for viewing some results. Not that it's taking me a lot of time to do it manually everytime, but it would be great if I could optimize that.
Is there a way to do so? Would a macro be the solution, or are they just for typing stuff?
Thanks a lot!
Ok, there's an easy way how you can achieve this - I have tested it right now:
Install AutoHotKey (or start portable version which runs without installation)
In Windows 7 and above, ensure you launched AutoHotKey as Administrator (otherwise you get inconsistencies in its behavior) - if not sure, exit it and restart it as administrator
Right click Autohotkey tray icon and select Edit This Script
Import the macro below this list at the end of the AutoHotKey script file and save the file
Right click Autohotkey tray icon and select Reload This Script.
–– This was end of general steps, now let's go with your macro: ––
In N++, display Preferences window and press its Close button1 at the bottom (NOT at the top-right corner)
Now you can use shortcuts Win+F2 and Win+F3 to switch different tab sizes instantly
SendMode Input
DetectHiddenWindows, On
SetTitleMatchMode, RegEx
;--------------------------------- Hotkeys for Notepad++ only
#IfWinActive ahk_class Notepad\+\+
#F2::Send {F10}{Right 6}{Down}{Enter}{Tab 2}{Space}16{Enter}{Tab 3}{Space}
#F3::Send {F10}{Right 6}{Down}{Enter}{Tab 2}{Space}4{Enter}{Tab 3}{Space}
#IfWinActive
1) Important: N++ user experience provided in dialog boxes is absolutely terrible. There are no anchors where you can fix focus when using keyboard. Thus you always need to perform step 4 manually when leaving Preferences dialog box otherwise the macros would send keys into incorect window page OR at correct page but incorrect control. Preferences dialog window remembers selected page and control. Macros I created for you therefore assume that correct page is already listed and button Close was recently focused.
Good news is Notepad++ windows with this weird behavior are rare exception from general user experience. In other places in N++ (or in other apps) where user interface components (menus, dialogs etc.) always start from the same point you do not need any special precautions like the one in step 4.
Adjust the macros as you like:
you can create more of them
you can adjust the numbers "16" and "4" typed into tab size input box
you can change shortcut keys to something else
you can replace sending keys with sending mouse clicks at desired screen/window positions
you can achieve many other useful shortcuts in N++ and in all other apps – check AHK deeper!

Eclipse toggle show/hide panels

Is there a way to show/hide various panels in Eclipse?
For example, shift-alt-p opens the Package Explorer panel in my setup, but then to close the panel I have to mouse over and close it manually.
Ideally one could toggle show/hide panels in Eclipse with keyboard shortcuts set via prefs > general > keys
Tough on the wrist to go keyboard-mouse-keyboard-mouse all day.
Perhaps I'm missing some magic combo, please enlighten if you have the Nirvana to spare.
Press Ctrl+F7 you will get below pop up.
Traverse or cycle through the views you want to close by pressing F7 key. After selecting the view to be closed in the above pop up release Ctrl key.
Then the view to be closed will be activated.
Go to Window->Preferences type keys in the search box. Check whether any short cut key is assigned to close part. Refer below picture,
In my case it is assigned to Ctrl+W. Once the view is activated press this short cut key to close the view. If any short cut key is not assigned to close part then you can assign new short-cut key for this.
Click on Binding text box(Refer second picture) and assign your own short cut key.