KiCad does not zoom the display monitor on which the mouse cursor is located

One thing I do (I bet that many KiCad users do this) is to run KiCad with two monitors. Typically I have the schematic on my laptop display and the pcb on my external 2K monitor.

I often seem to do this stupid thing…I place my cursor on the pcb (for example) and I want to zoom on that. But if I do not then click on the pcb and my last click was on the schematic, I end up zooming the schematic instead of the pcb. I guess the software cannot tell which way my head is turned… :frowning:

My question is whether this might be a common sort of stupid move, and whether it would be possible to have zoom act on whichever display the mouse cursor is now on rather than the last display on which I clicked?

What OS are you using? In Linux you have the choice in the desktop manager of click to focus or focus follows pointer (what I use).

2 Likes

Thanks, Ken. That was a quick response!

Sorry…I am using Windows 10. So does this mean that this cannot be controlled by KiCad software?

You might want to explore the W10 windows manager to see what options for focus policy are available. This is not an application setting but a window manager setting.

1 Like

Thanks again, Ken

Cannot seem to find any such control within Windows 10; but maybe I need to poke around the Windows community to see if I am missing something. Regarding the key word “focus”, Microsoft seems to relate that to notifications; this does not seem so logical to me…

“input focus” is the correct terminology. Which viewport has “input focus”, the last viewport you clicked, or the viewport upon which the mouse cursor is now placed? Typically the window manager changes the titlebar of the viewport which has input focus, or something to make it look different from all the other open viewports, so you see at a glance the viewport which has input focus.
Sorry, I have no experience with Windows 10. In linux, this process is called X. X is the framework developed in 1986 by a consortium of operating system creators who all used bit-mapped “windows” for their operating system. I was there. This included DEC, Hewlett-Packard, Microsoft, MIT Media Labs, and Silicon Graphics. Might have missed one. See wikipedia for more details. In 1992 I believe, Xfree86 became the first implementation of X for linux, written for the 80386 microprocessor family. X is a client-server system on which the server displays the graphics in the “windows” on which it runs and the client generates the data which to be displayed. From the perspective of X, the client and the server are not necessarily on the same computer ( However, for most application programs such as kicad and Open Office, they are.) But the client and the server must share an internet connection.

Thank you, qu1ck and Russ.

I went to X-Mouse Controls and (to be careful) I submitted the URL to Virus Total which approved it immediately. Microsoft gave me a sort of “Caution are you sure you want to run this?” but I pushed ahead. I have installed it and clearly it does something but perhaps not quite what I expected yet…working on it…

It seems that I need to move the mouse twice. The title bar responds properly if I move the mouse. So if Eeschema is focused and I move the mouse to Pcbnew, the title bar on Pcbnew changes color properly. But if I then hit F1 or F2 to zoom, the mouse will warp back to Eeschema and Eeschema will zoom. But if I again move the mouse to Pcbnew and hit F1 or F2 then Pcbnew will zoom. Still scratching my (partially bald) head on this.

What I would like to do is try this.maybe with Microsoft Office for example. Open a spreadsheet on one monitor and a Word document on the other and see how that behaves.

This is about my 4th update: With Word on one monitor and Excel on the other, this utility seems to do exactly as expected. Not so with Eeschema and Pcbnew.

Note to forum moderator:

I can understand that my original title for this discussion was not so good; not so indicative of the subject. But IMHO this new title is also not so good for someone in my position looking to figure out the same issue. I would not know what “Windows focus” means and I would not think to investigate this title to see whether KiCad can react to the monitor on which the mouse cursor is located.

How about: “KiCad does not zoom the display monitor on which the mouse cursor is located”?

See
https://www.google.com/search?q=Windows+focus&oq=Windows+focus&aqs=chrome..69i57j0l7.14201j0j8&sourceid=chrome&ie=UTF-8

The forum search does use all text. The title should be written to attract possibly knowledgeable people that can answer your question.

Also you are able to change the title of your own topics.

Got it, Rene

Thanks.

I am not a KiCad developer, but I thing this whole issue has nothing to do with KiCad. Until recently I used Debian Buster with Mate (or was it Cinnamon) as desktop and I could zoom in or out of a schematic by hovering the mouse over it and scrolling with the scroll wheel without changing focus to the the window that was zoomed in or out. With my new desktop (Linux Mint with XFCE) when I rotate the scrollwheel above a window it automatically gets focus. I can even adjust my OS in such a way that focus is changed to a window by just moving the mouse cursor over it.

With my new Mint desktop focus for popup windows also behave differently when I try to make screenshots, from for example a file save popup dialog. When I press the [Print Screen] button the screen grabber program pops up, where I can select how and which part of the screen to grab. Then when I have selected that, the main program, and not the popup window gets the focus. which is slightly annoying.

Overall. Who gets focus when is a function of the OS, and I have not seen KiCad do sneaky things with it.
On different Linux distro’s and more: Desktop window managers there are all kind of ways to influence the focus behaviour of windows, and none of these have actually anything to do with the programs that are running. Whether KiCad, Libreoffice, Gimp, FreeCAD or whatever. It is the windows manager that handles it.

@BobZ: Do you see any difference in which KiCad windows are handled compared with other programs on your PC?

Thanks, paulvdh

Yes I mentioned last night that (after loading X-mouse controls) that my PC would switch between Microsoft Excel and Microsoft Word based on the location of the mouse cursor. But this does not work quite right with KiCad. I have to repeat the procedure to get to the other monitor, which means that I have already zoomed where I did not particularly intend. So unless I find a better workaround, it will probably be better for me to disable X-mouse controls when using KiCad.

Before loading X-mouse controls, all programs (including KiCad and Microsoft Office) required a mouse click (or perhaps something else such as Alt-Tab) in order to switch “Windows Focus.” I am using quotes because this term seems to have a different meaning within the world of Microsoft Windows. I think I would prefer the term “active window” but perhaps there is some issue with that.

I certainly would not say that KiCad is doing anything sneaky, but it is little stretch to say that it does not work the same as Microsoft Office. M.O. has not been an example of Always Wonderful Software so this is not necessarily a bad thing.

I do not know what the “usual features” are for mouse behavior on Windows, and what exactly “X-Mouse” adds (though I have a pretty good idea of it’s intentions).

My guess is that there are 100’s of small programs made by varied parties that influence mouse behavior for Windows. Have you tried other “mouse enhancers” as alternatives for X-Mouse?
(Having multiple of such programs running at the same time … Yuck that would be a potential disaster )

You can spend countless hours on stuff like this. I found these tings very important when I was young. But now I mostly try to get to some settings that work 80% decent and just live with it. It also happens that little things which are quite annoying in the beginning turn out to be quite usable when you get used to them and anticipate on their behavior.

Thanks, paulvdh

The normal Windows 10 behavior with multiple windows seems to be (based upon my non-expert observation) that you need to click within that window to make it active. Just positioning the mouse within it does not activate it. I judge that you can alternatively replace the word “window” with the word “display” when a program or Eeschema or Pcbnew is maximized in a display. Perhaps it is the linked behavior between Eeschema and Pcbnew which contributes to the frequency of this error; that clicking on a footprint centers the linked symbol and vice versa. Anyway I react as if I am working on one window when the other is still active, and I zoom on the wrong window. This is only a minor annoyance.

X-mouse seems to cause the cursor position to control the active window, at least between Microsoft Word and Microsoft Excel. I am thinking it might be worth keeping just for that. But it does not seem to work correctly between Pcbnew and Eeschema.

I was only wondering if there might be an easy solution and this is not a pressing problem. I don’t want to screw up my PC by trying too many different software utilities for this and I don’t expect to continue testing such utilities.