Trying to control Android Studio by keyboard only, I do not know why, but when I focus "Cancel" button and press enter, it acts like I clicked on the default button (next tip is shown). The same scenario applies to WebStorm.
then I press Tab or right arrow (notice the blue glow around the button)
The solution, as LazyOne mentioned, is to use SPACE instead of ENTER.
Related
I want to create something like plugin or driver for mouse and extend right button mouse menu with movements. First of all, I want to create next feature:
1.user press right button and while button pressed move mouse up
2.will be shown a simple image with the scheme. arrow up and text "close"
3.when button released current window will be closed.
something similar was in old opera browser and it was very comfortable.
I try to find in googleб but I found how to do only for WPF or browser. I want to create global for the whole system with different configs. for example mouse, up in explorer will close the window and in visual studio, it will fire "Run"(f5).
I want to create this using C#. also I have basic knowledge in c++.
I will be grateful for help
I have a QComboBox which is made editable. When I type some text in it and press enter, it is performing its action. But the cursor still blinks in the text box. And even if by mistake I press any UP/DOWN key the item is changing.
How to remove this blinking cursor if I press enter or click mouse outside its area?
That is the standard behavior of a combo box, in Qt or in any other toolkit. If you want that cursor to stop blinking, then give the keyboard focus to another widget. You can call QWidget::setFocus() on another widget of your application. Also have a look at the general documentation about focus in Qt5, Keyboard Focus in Widgets, to get more input on keyboard focus.
I must say first - I AM NOT THE PROG OWNER, I don't know how it works and etc, I just need an advice that I could give them.
The program is running on windows based tablet PC with windows 8.
There is some prog that uses OpenGL ES 2.0. It renders some buttons and displays those.
Those buttons can be pressed by mouse left button, but if you use sensor screen, you must tap that button twice for single press.
Shortly - some button displayed.
Mouse left button single click -> button pressed
Single finger tap -> button not pressed
Double finger tap -> button pressed.
I don't understand why that happens. Single tap should imitate single click... Weird.
Anyone have any ideas?
I am not sure about this, but I think this may have something to do with how the program checks if the button is pressed. (long long time ago in my C++ days) If it checks the coordinates on click event then there is a possibility that when you touch the button, it only registers the location of the press, and not the press itself. On the second touch the location is already on the button so the click event is true on that button.
Anyone with more insight please feel free to edit ;-)
When you have a GtkButton in GTK and it is the default for some window (will be activated when you press Enter), a tiny border is draw around it to inform the user that the button is the default button. How to remove this border ?
I already tried: default-border and default-outside-border style properties.
After hours finding for this, I've discovered it:
gtk_button_set_relief(GTK_BUTTON(button_widget), GTK_RELIEF_HALF);
GTK should have a gallery showing how this changes the button behavior.
Using C++ in VS2008, I'm at the beginnings of a DirectX program which can so far display a token image and flip between fullscreen and windowed mode with no problems.
It has a menu bar, which is invisible as expected in fullscreen mode. The ALT key could still activate this menu in fullscreen, but it was very clumsy since its items weren't visible until highlighted, and even then it only responded to about 1 in 5 presses of the ALT key.
So I decided to implement a popup menu instead, that responds to the right mouse button. My problem is that this popup menu is also temperamental in fullscreen mode. It also plays with the custom cursor I am using.
The wrong behaviour is defined as follows:
1· A right click anywhere will active the popup menu, but also deactive the custom cursor and replace it with the system default.
2· Once the menu is visible, RIGHT-clicking outside of the menu will deactive it, but this leaves the default cursor on. However, right-clicking again will activate the menu again, and this continues perfectly if not for the missing custom cursor.
3· Once the menu is visible, LEFT-clicking outside of the menu will deactivate it, and this displays the custom cursor again. Now it gets a bit more messy because now:
3a· If I right-click, it will return to step 1. Menu on + cursor off.
3b· If I left-click a second time (as if I am gaining focus or something), then right-click, will will activate the default cursor but NOT active the menu (as if I half did and half didn't regain focus or something). Menu off + cursor off.
3c· If I move the mouse and then right-click, it will do one of the above. Step 1 or step 3b. Menu on + cursor off, or menu off + cursor off. Frustrating.
4· Most obvious, if step 3b occurs (menu off + cursor off), the user can flip the custom cursor on and off forever. Left click on, right click off. Not only does the menu never appear, but this is simply not what I want a user to be seeing in my program... the cursor changing for no reason.
I imagine the cursor changing is to do with the menu itself taking focus or something like that. I would like that to be avoided if possible, but the real problem is why is the menu activation temperamental in the first place?
My code for the popup menu is:
case WM_RBUTTONDOWN:
cout << "Right button in fullscreen" << endl;
TrackPopupMenu(GetSubMenu(g_menu,0), TPM_LEFTALIGN|TPM_HORPOSANIMATION,
30, 30, 0, g_parentWindow, NULL);
// SetActiveWindow(g_parentWindow); // Makes no difference.
// SetForegroundWindow(g_parentWindow); // Makes no difference.
break;
One more thing. If I use F3 to active the menu instead, absolutely nothing happens.
Problem 1: Can I make the menu activate reliably?
Problem 2: Can I stop the cursor from changing?
Problem 3: Why does a key command not work?
Thanks for the read. Any ideas?
you can use this little function to set the cursor back to your customize cursor SetCursor(CURSOR_ID); you can add this in WM_RBUTTONDOWN