Remap CMD+H shortcut in OSX - regex

Is it possible to remap the "Hide Window" shortcut in OSX? I know about the possibility to remap just about any shortcut in the System Preferences that are either built in or just available in a specific app.
The thing is that CMD+H is not being shown as a 'built-in' shortcut. Also this shortcut is special in that it has a different name in the menu in every app in that it is called "Hide Appname". That makes it impossible to generically add it manually to the shortcuts. Unless there was a way to use Regexps or there would be a magic constant like "Appname".
The reason I'm asking this silly question is that I want to use CMD inside my Linux VMs as Meta key so that my tiling window manager has a sweet shortcut. Currently this works fine, unless I accidentally hide the Window(:

Related

Qt: How to Write a Windows Desktop Utility?

I've used Qt for widget development a fair bit. That's straightforward. But how could I write a program that can be invoked from anywhere on Windows?
Say I've selected some text in a web browser. I want to be able to invoke my program via keystroke, maybe show a little list containing a list of text files I can select (ideally where the cursor is), and then add the selected text to that file.
How can I do this?
I suggest you to have a look at:
https://skycoder42.github.io/QtService/index.html
https://forum.qt.io/topic/67043/qt-daemon

View functions in an object [Eclipse C++]

So i am having trouble viewing the member functions of my declared objects. I am using a MAC and i have an object. I want to see what kind of functions exists in that object. I cannot find the shortcut key for this so i was wondering if someone else knew it?
On my windows computer for java it use to be ctrl + space but that does not seem to work for c++ in either my mac or windows. Please help me out.
It could be because of the Windows Language Services Utility. The default method to switch between languages on Windows is to use the ctrl + space keyboard shortcut, which could be conflicting with the keyboard shortcut for auto-complete in Eclipse.
To get rid of this conflict, you will need to remove all other languages from your computer. Here is a solution:
You can find out what languages you have set up by going to Control Panel -> Region and Language -> Keyboards and Languages (tab) and then Change Keyboards (again, how obvious…). You’ll see a list of languages installed – remove any that you don’t want (click the language and then click the Remove button) until you only have the ones you want left. That fixed it for me, but you can also check the Advanced Key Settings tab to make sure that none of the keyboard shortcuts that are set include Ctrl-Space. - Robin's Blog
Alternatively, you may also want to check whether there is any other conflict with the default keyboard shortcut with Windows and Eclipse C++ IDE:
... but you can also check the Advanced Key Settings tab to make sure that none of the keyboard shortcuts that are set include Ctrl-Space. - Robin's Blog

Can I define my own custom character shapes in ncurses?

Title says pretty much everything. Once upon a time when I was under 13, my older bro did in BorlandPascal a thing which amazed me. He defined kind of table [8][8] with values of 1 and 0, meaning respectively foreground and background. Having several of such tables he could somehow redefine default ASCII characters to look like in these tables. I have no idea how it was done, but it worked.
My question is: can I do similar thing in ncurses, and if I can then how to do it?
The short answer is no. What ncurses does is generating ANSI escape codes which are interpreted by the terminal. There are no codes for altering the font. (Althou there have been extensions propesed no commonly used terminal supports them, neither does ncurses.) And there is no generic way of communicating with the terminal through some kind of side channel for changing the font. But there might ways in some specific situations.
If you have direct access to a Linux console for example you could could do all sorts of things, much like in Borland Pascal. But it will likely be more messy and less impressive.
As the selected answer explains, this is not possible for NCurses to render custom glyphs. ncurses only manipulates the terminal screen state via escape codes (Clearing and rewriting lines to achieve interactivity).
However it should be noted that's very possible to use custom glyphs in the terminal via custom fonts.
This is what Powerline does (a popular terminal UI status line for vim, tmux and friends): https://github.com/powerline/fonts
By patching the fonts, you can inject your glyphs into the existing font being used by the terminal, which then you can access and render via ncurses as any other character.
Of course this is not ideal solution, but with some auto patching of the fonts, and careful testing, it makes it possible to build an app that uses custom glyphs—when your really in a pinch for more expressive UI tools than ncurses can offer.
Further reading: https://apw-bash-settings.readthedocs.io/en/latest/fontpatching.html

App Shortcut without pinning to Start Screen in Windows 8 using C++

Our company has an installer written in C++ that creates program shortcuts using IShellLink as described in:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776891%28v=vs.85%29.aspx
On Windows 8 all shortcuts created in the Start Menu will also show as titles on the Start Screen. What we're looking to do is programmically control which icons are shown on the Start Screen. In the following article it describes the option "System.AppUserModel.StartPinOption" as:
To create add an app shortcut without pinning it to the Start screen
view, you can set the following property on the shortcut:
System.AppUserModel.StartPinOption = 1. The symbolic name for 1 is
APPUSERMODEL_STARTPINOPTION_NOPINONINSTALL.
http://msdn.microsoft.com/en-us/library/windows/desktop/jj673981%28v=vs.85%29.aspx
This appears to be possible using the Windows Installer, however I haven't found a way to accomplish the same functionality programmatically in C++ given our context.
If anyone has any information about this, or an example of some sort, it would be much appreciated.
One thing I found was that "..NewInstall" literally means that. User customizations to the tiles seem to be retained even after you delete/update the .lnk files. This is probably a good thing as updates won't reset the user's environment, but it does mean that I needed to use fresh installs of Windows 8 during testing. I used a VM box to minimize the pain. At least I don't know how to delete the properties once set from within the environment.

Windows Explorer Context Menu

I want to add a context menu entry with C++. I've been searching but all I can find is some jackass trying to sell me some BS program that does it for me which is not what I am looking for. I'm not looking for anything that uses .NET or Visual C++ either. I want the straight C++ way of doing this.
You can add a right-click menu item that just runs a program, simply by registry editing. No need to do shell extension for that. E.g. I used to have an extract icon thing (copy to clipboard),
HKEY_CLASSES_ROOT\*\shell\copyIcon\=Copy icon to clipboard
HKEY_CLASSES_ROOT\*\shell\copyIcon\command="path to the program" %1
Cheers & hth.,
A decent tutorial, ignore the jackass title, is available here. This kind of shell programming requires COM, no escaping that. Trying to write COM code without MSVC support classes is character-building. But possible, as long as you know COM really well.