Menu Shortcut with two letters Ctrl+F+A - menu

I know is possible to have a menu shortcut like Ctrl+Shift+F but I do not find a way to make something like Ctrl+F+A work. Is it even possible?

I don't believe so.
If you look at the ´wx.AcceleratorEntry` you'll find:
AcceleratorEntry(flags=0, keyCode=0, cmd=0, item=None)
flags (int) – A combination of the wx.AcceleratorEntryFlags values, which indicates which modifier keys are held down.
keyCode (int) – The keycode to be detected. See wx.KeyCode for a full list of keycodes.
cmd (int) – The menu or control command identifier (ID).
item (wx.MenuItem) – The menu item associated with this accelerator.
So in effect, you want to have multiple keyCode's.
Given that it's a single int rather than a series of flags that accept bitwise operations, I think your cunning plan is doomed.

Related

In MS Excel: use "MS Word style" keyboard shortcuts to trigger VBA procedures

For starting VBA procedures in MS Excel by keyboard shortcuts one can assign such shortcuts following the pattern
Ctrl + [one letter]
This seems to be the only possibility provided by the makers of Excel. Even Ctrl + [a digit] does not work, as such a combination cannot be assigned using the by-default method.
I want, however, have "MS Word style shortcuts" available such as
Ctrl + [letter or digit or whatever] + [letter or digit or whatever]
because they not only give me a larger number of shortcuts but also let me assign shortcuts that help me memorize them e.g. Ctrl+d+e for "delete everything" (just an example).
Therefore I am searching for a way to create such enhanced shortcuts. I am thinking of a VBA procedure that tracks keys hit on the keyboard, and on certain combinations would start doing someting (Case a --> do x, case b --> do y, etc.).
A lazy method could be writing a procedure that reads the following two keys hit, and the procedure itself would first have to be triggered by a "by-default type" shortcut such as Ctrl + [letter]. This of course would nearly double the number of keys i have to hit to start something.
Question: Is there a way to let a VBA procedure track all keys being hit, store them e.g. into an array of e.g. four places, the way a CCTV camera records things (deleting the oldest), and pay attention for certain combinations e.g. Ctrl + [letter] + [letter], and if found do something?
Of course, such a key logger procedure should not slow down my system noticably.
Looks like this question has been asked before, see: Is there any event that fires when keys are pressed when editing a cell?
Looks like a lot of effort in VBA, basically using PINVOKE to get to underlying Windows functions. You may want to look at a more fully rounded development environment if you have this kind of requirement.

Catching special characters with ncurses

I am currently working on a project for mapping every possible keyboard and mouse interrupt.
The mapping is done in linux environment and with ncurses library.
The question is how to catch the following keyboard keys :
Home
End
page up / down
when pressing those keys the terminal itself is catching them and the program itself cant see them (spent a few hours of configuration and found no solution yet)
pause/break (above page up in standard keyboard)
PrtScreen
Num Locked keys (0 to 9 and < . >).
Windows button
the following just not getting any response at all, neither from the terminal or the program.
short: you cannot catch all keys with ncurses
long: the usual problems lie in a failure to initialize things properly:
you probably forgot to call keypad(stdscr,TRUE) (or whatever window you might be using with wgetch). That will allow an application to read any of the keys defined in the terminal description as an integer.
If it is not in the terminal description, (n)curses will return the sequence of bytes which make up the key as sent from the keyboard.
That's two likely problems. There are other keys (or combinations of keys) which the terminal will not send (in a way which makes distinct keyboard sequences). For instance, using the Control key with other keys may change the sequence sent by the keyboard, or it may not. To see this, use experiment with the control key with comma, period or the other punctuation keys in that area of the keyboard.

Is line number/sign click detectable in vim?

Is there any way to detect clicks on line numbers or signs (just on line numbers or signs and nowhere else on the line) via a vim-plugin (i.e not extending vim code itself)?
First, offering a feature that is accessible only through the mouse won't get you many fans of your plugin, as many users avoid using the mouse.
Second, features such as the signs column are only marginally related to text editing, and as such aren't so fully featured as in IDEs.
Therefore, I don't think that's possible. Neither v:mouse_col (to be used with getchar()) can address the display cells outside the text buffer, nor does v:beval_col (for the balloon tooltips). You can only determine the width of the side columns by comparing wincol() with virtcol().
Better provide a (configurable) mapping for your plugin's feature; this is more universal.

Creating your own LaTeX keyboard layout : 1 key = multiple caracters

I've been looking for the answer for quite some time now. This is a project I have but I can't manage to find a way to do it. The main idea would be to plug an additional keyboard on my computer that write multiple letters by hitting only one key. For example, instead of writing down a (when I hit the a key), it would write \textbf{ (for example).
I already manage to find the keyboard layout file under Linux and to switch the a and b keys, but I cannot find a way to print multiple characters.
I know it exist editors (like Texmaker or Kile) that have auto-completion, but I'm most of the time working in project in groups and therefore we use writelatex.com which does not propose auto-completion in it's free user pack ! Besides, I'm doing that for my personal interest.
Thanks a lot.
Have a look at autokey. It can assign phrases to hotkeys. It requires X11.
Another option might be to use a powerful text editor like vim or emacs which both have features like this, and then copy/paste the text into writelatex.com.
Some browsers have add-ons that allow you to edit the contents of a text field on a web page with a chosen text editor.
Edit: In Xorg you can use the X KeyBoard extension to e.g. change the meaning of individual keys. While you can configure the keyboard to generate (multibyte) unicode characters, you cannot assign arbitraty character strings to one key, to the best of my knowledge.

Visual Studio hot key - switch Find context/location

Is there a hot key to toggle the search context/location in the "Find"/"Find in Files" commands (Ctr+F and Shift+Ctrl+F respectively )? I'm talking about the drop down that asks where to search for example Current Project, Current Document, Entire Solution etc.
"Find" is probably my most used feature since working with markup and CSS very often I can't just F12 to a selector definition or Shift+F12 to Find Usages, a regular text search is really the only option and I want to make this as efficient as possible.
Yes, I can tab to it but this takes 6-tabs and if I do it fast, often get the count wrong and prematurely execute bad searches; so it's not cutting it.
If there isn't a hotkey how can I set one? Ctrl + F3 would work well since F3 is "Find Next"
Thanks
I'm not sure if there is a command in Visual Studio that does what you are looking for.
If there is one, you can set the shortcut key in the Tools\Options menu (Environment\Keyboard).
In the screenshot, I'm searching for all the VS command that contain "find". Perhaps one of these is what you need.
Then move to the Press shortcut keys textbox and choose your desired key binding.

Resources