Listbox won't show keyboard caret when clicked on by mouse or focus programatically set - winapi

I'm using a CListBox with Extended selection. When I click on the control, no keyboard caret is shown. Using the up and down arrows also doesn't allow me to show the caret. If I press tab and then shift tab, I can then see the caret. Using GotoDlgCtrl(&listboxCtrl) or listboxCtrl.SetFocus() also don't work.
How can I get the keyboard caret to show up on mouse click or programmatically?

Using the mouse is not supposed to display the keyboard related UI features:
For example, if the last input came from the mouse, the system will hide the keyboard cues. And, if the last input came from the keyboard, the system will show the keyboard cues.
To fake a change you can use:
PostMessage/SendMessage(hListBox, WM_UPDATEUISTATE, MAKELONG(UIS_CLEAR, UISF_HIDEACCEL|UISF_HIDEFOCUS), 0);
...or send it to your top-level window if you want to apply the change to all children.

Related

Maximize terminal in VSCode when in side panel

In previous versions of VSCode there was an arrow icon at the top of the panel that could be used to maximize the panel, for instance the terminal. I do not know exactly in which version but that button is now gone and I'm unable to find an equivalent.
My question is: how can I maximize the terminal so it takes the whole VSCode window? Is there any way to get the button back?
Which version of VSCode are you using, and in which OS?
On Mac, and with 1.65.2 (the most recent update by now), I have it in the right corner, near the X button:
Shortcuts
Now talking about shortcuts to make your life easier, there are 2 you should be aware of.
PS: Remember that to change any shortcuts, just go over VSCode Command Palette and type Keyboard Shortcuts to change them.
Maximise panel size
There are no default shortcuts for those, in both Windows and Mac.
If you want to set any, the name of the shortcut is View: Toggle Maximized Panel:
Increasing / decreasing terminal size
Now talking shortcuts, if you want to resize your terminal window, in Mac there's a native shortcut that allows to increase / decrease terminal size with Cmd + Ctrl + Arrow Up / Arrow Down.
There's no default for Windows.
If you want to set / change those shortcuts, they are called Terminal: Resize Terminal Down and Terminal: Resize Terminal Up:
Terminal panel on the side
If you added your panel to either left or right, then the mark to make it fullscreen changes.
After clicking on the arrow below, it'll hide all your files and make the terminal to run in the whole screen for VSCode:
I also got the arrow disappeared, but i manage to bring it back by with command:workbench.action.alignPanelCenter
But i don't know i un align it in the first place
So maybe it will work with you
To get the maximize arrow on the left panel...
Left-click the bottom panel, then choose Move Panel Left
To get the maximize arrow on the bottom panel...
First, press the Customize Layout button
And select Center Panel Alignment
Then move the panel back to the bottom.
Panel can be maximized when centered.
Example: If panel is not centered and the Maximize button is missing you also cannot use the command by hitting
Shift-Ctrl-P View: Toggle Maximize Panel
Fix: run these commands (press Shift-Ctrl-P then begin typing)
First command will enable the maximize button
View: Set Panel alignment to Center
Second command will now work to Maximize (or just press the button that shows up now)
View: Toggle Maximize Panel
Blue and skube have the right answer to the original question. I cannot comment so summarize an answer using commands that can be pasted to verify.

I can't use 'click' to add short cut in android studio?

add shortcut
I use command + button Click nothing happened but every other keys work properly.
Go to the settings menu as described below
File ->
Settings... ->
Keymap
From the appropriate menu/sub menu header, Pick the action you want to assign a shortcut to.
Right click to select either a keyboard or mouse shortcut.
Keyboard shortcut
Choose a key combination.
If the key combination is already in use you can either choose a second stroke or a modifier like CTRL, ALT or SHIFT etc.
Mouse shortcut
Choose a click or double click, scroll wheel up / down etc.
If the mouse short cut combination is already in use you can use a keyboard modifier like CTRL, ALT or SHIFT etc.

Zoom one tab or all tabs

I am looking for a way to zoom only one tab.
When I press Ctrl++ to zoom my Firefox tab, all other tabs are also changed, creating a problem.
I have checked all the menu setting and nothing is available for this setting, at least not from the menu.
In Firefox address bar type: about:config
Press the box "I accept the risk" (or similar button)
In the Search Box type: zoom.siteSpecific
If you want Zoom to only effect one tab then set False under Value.
If you want Zoom to effect all tabs then set True under Value
You can change the value by double-clicking the line or right-click and select Toggle.
Note: You can restore zoom by selecting CTRL+0 (zero) or on the menu select View --> Zoom --> Reset.

Visual Studio 2013 - Replace All Button gone (not just off screen)

I am unable to perform multi-file text search and replace (in Visual Studio).
In the past, when I opened the "Replace in Files" dialog, there were 4 buttons in the lower right. One of the bottom two buttons allowed me to "Replace All".
The two lower buttons (including "Replace All") are no longer present.
I believe this occurred after I changed some Windows settings so that I could use menus without the Magnifier.
It is not just a matter of the buttons being off-screen because the window is too large (although it is too large - they would be off-screen, if they were present).
I can drag the window and see the bottom, even though the top is then off-screen (I use AltWindowDrag, allowing me to hold the ALT key, and drag by any part of the window, not just the title bar).
The two lower buttons are not present. I'm unable to resize the window - when I try, nothing happens, or the window repositions so that I can see the title bar, but can no longer see the bottom.
The two buttons that are still present (Find Next and Replace) don't have keyboard shortcuts, so I presume that Replace All doesn't either. Nor can I select either of those two buttons using Tab, so probably can't select an "invisible" "Replace All" button that way.
Any help appreciated.
You can use Find and Replace by pressing Ctrl+H and to Replace All just use Alt+A.

FocusIn/FocusOut not generated

Can someone please clarify the default focus handling of the X11 server? My understanding is that the focus 'follows the mouse' and sure enough if I move the mouse between separate terminals I can see the cursor changing as each window aquires/loses the focus.
But when I run two xev windows and move the pointer between them, I see plenty of MotionNotify/EnterNotify/LeaveNotify as the pointer moves from one window to another - but FocusIn and FocusOut are nowhere to be seen. Is this an oddity in xev? Is there some special mask or property which needs to be applied in order for these events to be generated?
Many thanks, R.
While I do not fully understand the answer(s), I am grateful to parkydr, minitech and any others who may have stopped by.
Thanks again, R.
Having focus refers to the window which receives keyboard input when you press a key.
The focus handling depends on your window manager. The most common mode is click to focus, which your window manager is set to, where you only get focus when you click on the window. An alternative is that the keyboard focus follows the mouse, which is what you are expecting.
There should be a setting to change this in your window manager settings.
The cursor changing does not indicate focus, just that the terminal has defined a different cursor.
To demonstrate, open a terminal and an xev window.
Click on the xev window and press a key, you will see key events.
Move the mouse to the terminal window, you'll see the motion and leave events
Press a key and you'll still see key events from xev
Click on the terminal window, xev will give a focus out event
Press a key, the characters will be displayed in the terminal window
Move the mouse over the xev window and press a key, the character will still come out in the terminal window

Resources