22 Oct 2023

Customise Mouse Keys (including side keys)

收藏到CSDN网摘

I purchased a mouse some time ago from Amazon. It features 2 additional side buttons in addition to the typical left-right-middle layout. I was pleasantly surprised to find that these side buttons functioned seamlessly while browsing webpages, serving as the backward/forward navigation controls in the browsing history. This convenience sufficed for most of my needs.

However, I required the side buttons to emulate the LEFT/RIGHT or UP/DOWN arrow keys to ensure smooth navigation within my HTML slide deck for teaching. This mouse is budget-friendly, and unfortunately, the manufacturer does not provide any driver or software support for customisation.

Fortunately, I came across a free software solution known as X-Mouse Button Control, which expertly resolved my issues. I have successfully tested it on a Windows 11 x64 system, and it has been reported to work on Windows 7 and Windows 10 as well. If you encounter a similar issue, it's certainly worth trying out this software.

24 Mar 2023

Matlab: Terminate Execution by emulating CTRL+C

收藏到CSDN网摘

This is a really usful trick for GUI development in Matlab. Although Matlab has some advanced methods such as Future object to run the process in background. But a simple method to mimic what the user does by pressing CTRL+C would be nice to have!

7 Mar 2023

Matlab: convert time duration to string

收藏到CSDN网摘

Matlab has its own tic/toc function to measure the running time a peice of code, which is very convenient and widely used by developers. The duration() function along with hours(), minutes(), and seconds() is another way of creating time durations explicitly. All of these duration types need to be converted to string format for displaying purpose. How can/should we convert them properly?