Scroll using the mouse in nano editor? - nano

Probably not the right place to ask this question, but I couldn't find the answer anywhere. As the title says, is there a way to enable mouse wheel scrolling in the nano editor? (specifically ubuntu 14.04)

Nano doesn't support using the mouse wheel to scroll. You can enable nano's (limited) mouse support with alt-M or with --mouse when starting nano (another invocation returns to whatever mouse support your terminal has), but that's it:
−m, −−mouse
Enable mouse support, if available for your system. When enabled, mouse clicks can be used to place the cursor, set the mark (with a double click), and execute shortcuts. The mouse will work in the X Window System, and on the console when gpm is running. Text can still be selected through dragging by holding down the Shift key.
(https://www.nano-editor.org/dist/v2.6/nano.1.html)
By default, mouse services are provided by the terminal window. The mouse works almost the same as in a GUI editor. You can highlight text, right-click to copy and paste, and use the middle mouse button for pasting text from the buffer. However, when you use the middle mouse button to paste text, the text is pasted at the current cursor location, not at the mouse pointer location. Other limitations exist. For example, you cannot use the mouse to cut or delete text, nor can you use the mouse to scroll through the file.
Nano has its own built-in mouse services, but they are limited. They provide only the ability to move the cursor to the point where you click, and to mark the beginning and end of a section of text. Use the Alt-M key combination to toggle between using the terminal's mouse services and nano's built-in mouse services.
(https://help.ubuntu.com/community/Nano)

To scroll by mouse: toggle mouse support OFF: Alt + m, or Esc m. The caveat is, it will also reposition the cursor.
Of course once mouse support is disabled, using the mouse to position the cursor will no longer be possible. The simple workaround is to toggle mouse on/off as needed.
The reason this works is because, with mouse support disabled in nano, it falls back on the terminal to handle the mouse. It does this by printing to the screen whatever input it receives from the mouse as a stream of escape sequences. Since these escape sequences are standard, nano knows exactly what to do with them and positions the cursor accordingly.

Related

Prevent text size from changing when pressing Control and scrolling with the mouse

I often use my laptop's integrated touchpad to scroll using a two finger swipe. I also press the Control button quite a lot as I Ctrl-Tab between open tabs.
While I don't intend to do these two operations simultaneously, it is very often the case that I have just completed a scroll action but have not lifted my fingers before I hit Ctrl-Tab to switch tabs.
This has the unintended and extremely annoying effect of changing the text size. I have looked to see if there is a keyboard shortcut I can remove, but the only thing I could find (by searching the keyboard shortcuts for "zoom") were shortcuts assigned to "Ctrl + Shift + (Global)". I'm not even sure what (Global) means, but the fact this includes Shift would indicate it's not the issue since I am not pressing Shift when this happens. And, as expected, removing these shortcuts did not help anything.
Is there any way to remove this shortcut (again, ctrl + mouse scroll)? No matter how many times it happens, I still do it again. I understand many people's suggestion will be "just get a real mouse". Obviously, I've thought of that, just so you know.

New Preview BigQuery UI Zoom Shortcut

I keep accidentally hitting some key combination that zooms out in the editor of the new Bigquery UI and cannot figure out how to reset it to the actual zoom level without refreshing the entire page. The shell of the editor does not zoom and is the only part of the UI that responds to the normal Chrome zoom shortcuts, however the editor window remains zoomed at the altered level and does not change, screenshot
On my Macbook, the zoom-in/out could be triggered with Command + 2 finger touchpad up/down.
I don't have a Windows to try, but if you need Windows key, I guess the counterpart is Ctrl + Mouse scroll up/down.

AHK script to click a specific button in a program not working inside the windowed program window?

I'm trying to create a hotkey for a software button inside a program since the devs of the program did not do so.
Here is what I tried to move the mouse, click the button and move the mouse back to the original position:
F3::
CoordMode, ToolTip, Screen
MouseGetPos, X, Y
Click 512, 516
MouseMove, %X%, %Y%
Return
This works, on say the desktop, but when the program window is active, nothing happens. Is there some way to make this work inside the program window? It is a windowed program (not full screen) and it a scientific tool used to analyse physiological data.
Clean "CoordMode, ToolTip, Screen". Buttons in programs can be clicked using the messages "PostMessage, 0x111".

Detect mouse cursor icon change in application

I've been looking for awhile now to no avail for this.
What I'm trying to do is find a way to detect if a mouse icon changes when you mouse over something.
For example: If you mouse over a link it changes from the arrow to a finger.
My plan is to grab the ID of a window, and scan it for clickable objects based on the mouse icon changing. I can grab the window, bring it to the front, and move the mouse around by setting the x,y coord of the mouse, but I don't see a way to detect if the mouse has found anything.
I would prefer this to be something built into vb.net, but if I have to use an API I'm fine with that.
The approach is wrong because the concepts are different from what you observe visually.
There's no such thing as "click" -- there's Button Down event (Windows message sent by the GUI subsystem to the application), Button Up event and Mouse Move event. If there were Button Down and Button Up with no or little Mouse Move, then the OS considers this a click.
All events are sent to the window under the mouse cursor hotspot unless the mouse input is captured by the other window.
When the cursor is moved over the window, the OS sends WM_NCHITTEST message to the window to determine, how the window treats the area under the cursor. Based on window's response Windows either performs the window operation (window move or resize etc) or passes mouse-related events to the window procedure. The procedure then decides how to react - do nothing, make visual changes, perform some action etc.
As you can see from the description, cursor change and actual actions are two different loosely related operations. There can be an action without cursor change or cursor change without an action.

cocoa mousedown on a window and mouse up in another

I am developping a Cocoa application and I have a special need. In my main window, when I mouse down on a certain area, a new window (like a complex tooltip) appears. I want to be able to do:
- mouse down on the main window (mouse button stay pressed)
- user moves the mouse on the "tooltip" window and mouseup on it.
My issue is that the tooltip window does nto get any mousevent until the mouseup.
How can I fix this?
Thanks in advance for your help,
Regards,
And it won't since mouse is tracked by the main window. However, you can process mouseUp in the main window, transform click coordinates into the desktop space, get tooltip window frame and check whether the click occurred on the tooltip. After that, you can send a message to the tooltip window manually.
Or you can try to find another way to implement the final goal :) It is usually better to follow the rules, in this case - mouse tracking.