Category Archives: Uncategorized

Teams, Remote Desktop, and a Jumpy Mouse

1,067
Filed under Uncategorized

I use a work-supplied laptop for all job-related functions and I specifically do not have any work related stuff on my personal systems.

However, coding on a laptop…sucks.

Tiny keyboard, tiny screen, trackpad, etc, etc.

So I could use a docking station, plug the laptop in there and then have a real keyboard, mouse, and multiple monitors. But then, if I want to check personal emails, or do a little side project for home automation, I’d have to unplug everything and plug it back into my desktop.

Instead, I just stick my laptop on a shelf, powered on, and Remote Desktop into it from my personal desktop. That way, I have my monitors, keyboard, mouse, etc. exactly the way I want, and they can all be used seamlessly when connected to my laptop.

When the office standardized on Zoom, this worked perfectly.

But then they decided to switch to Teams.

Trouble in Paradise

Most of the time, Teams works fine. It’s definitely not my favorite app, but it does the job.

Except when sharing my screen.

Every time I do that, my screen will share, but then suddenly, my mouse starts resetting to a 0,0 position about every second. With the mouse jumping all over the place, it becomes literally impossible to control, and inevitably, I end up having to request someone else on the call to share their screen momentarily to break my share and restore mouse control.

A colleague recommended a little app called RegionToShare. That kind of worked, but not consistently, and it was a pain to always have to load that before sharing anyway.

The Solution

I’d done a little research months ago but hadn’t turned up anything. On a lark, I tried again last night and turned up a post on a Microsoft Support forum.

Turns out, this is a known issue in one of the Updates that happens for Windows 10. I’m not sure if it affects Win11 or not.

Press Win+R and type gpedit.msc to open the local policy editor

Drill down through these nodes:

  • Local Computer Policy
  • Computer Configuration
  • Administrative templates
  • Windows Components
  • Remote Desktop Services
  • Remote Desktop Session Host
  • Remote Session Environment

Find the entry called:

Use WDDM Graphics display driver for Remote Desktop Connections

and set its value to DISABLED.

That’s it.

Laying Asphalt

6
Filed under Uncategorized

Asphalt Paving I was contemplating having to pave a machine recently, and it occurred to me that it might be a good time to take stock of the “asphalt”, so to speak.

In other words, what are those apps and configurations that get laid down first? Those that I use everyday. That it’d be seriously difficult to do without, even from day one?

I’ve followed Scott Hanselman’s List of Tools for years. It’s a great list, and a fantastic place to get ideas for things that might dovetail into your personal workflow, so if you haven’t already checked it out, I heartily recommend it.

But it’s huge! I mean, really big. It’s a great reference, but I can’t imagine anyone using near that much on a daily basis.

So, what’s my asphalt then? Lets get right to it!

  • File manager – DirOpus. If you deal with files all day long, DirOpus is the first thing you should consider laying down. Fast and infinitely customizable, but it still feels like a Windows File Explorer.
  • Font – Hackd. My own version of LigaHack, which is itself a ligaturized version of Hack.
  • Editor – Visual Studio Code. I’ve used tons of different editors over the years, so VSCode is just the latest. It’s fast, flexible, extensible and customizable.
  • Password – Keepass. Hands down. After seeing news stories of all the commercial “credential managers” out there, I’m convinced high value targets like that are the last place you want to put your keys. Just make sure you back up.
  • Launcher – Flowlauncher. PowerToys Run is right up there, but FlowLauncher is xcopy installable, and super easy to write extensions for, as well as having just about any extension you’d ever want already available.
  • Backup – SyncBackPro + BackBlaze. Both are very reasonably priced. BackBlaze for offsite backup. SyncBack for synchronizing laptops, desktops, phones, etc.
  • Compare – Araxis Merge. I’m doing file or folder compares virtually every hour. I’ve tried others, both free and commercial but Araxis just feels the smoothest, and most polished. It’s not cheap, but I think it’s worth it.
  • Clipboard –ClipCache. Ok. There’s loads of free clipboard managers out there, and not just a few paid ones. But ClipCache does it all, it’s not very $$, and it just works.
  • Terminal – Windows Terminal + Cmder. I’ve never been able to get on the Powershell wagon, so there’s that. But Cmdr in Windows Terminal, with PowerLine glyphs and quake mode is awesome.
  • Macros – AutoHotKey. I’ve got my own set of favorite hotkeys that I’ll be writing about soon.
  • Processes – Process Hacker 2. Way, way better that TaskMan
  • Search – FileLocator Pro. Absolutely worth the (small amount of) money, esp with the new Index functions.
  • Screenshots – ShareX. Free and fantastic for screenshots, recordings and annotating.

And just to be straight. All of the links above are direct links to the apps I mention. I’m not an “affiliate”. I don’t get any money for “clicks” to these links. I have no relationship to any of these companies except as a customer.

So that’s it. These apps (and font Smile ) are running virtually 24/7 on my machines.

I’d love to hear you consider your “asphalt”!

Starting VSCode from the command line

4
Filed under Uncategorized

I do a lot from the command line, so starting VSCode to quickly edit a file I’m looking at can be a big help.

VSCode isn’t automatically added to the path, so it won’t normally be available. Besides, if you’re using the Insiders build, the exe name will be Code – Insiders.exe, which is, um, unwieldy, to the say the least.

I know there are other solutions out that that might make more sense depending on your situation, for me, setting up a simple BAT file to start the editor made the most sense.

I already have a folder full of utilities and BAT files that I always add to my path anyway. Plus, I like having a bit of flexibility that wrapping VSCode in a BAT file gives me.

Anyway, here’s what I’ve ended up with.

ECHO off

REM Starts VSCODE and returns immediately to the console where it was started from
REM Running it a second time just opens the new file in a new tab in the existing VSCode window
start /MIN /B "" "C:\Users\darin\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9 >nul

Using this, I don’t get “leftover” phantom command line windows, I don’t get random debug logging in the terminal window I started it from, and it all “just works”.

Of course, you’ll have to adjust the path if your name’s not “darin” 🙂 , if you’ve installed VSCode in a non-standard place or if you’re using the normal, not Insiders, version.

Tiny Icons on High DPI Systems

6
Filed under Uncategorized

I’ve been using a triple monitor setup with all three running at high DPI (4k) resolution for some time now, and I love it. I use 200% scaling, so text is reasonably sized, but at 4k resolution, it’s so much clearer and easier on the eyes.

For the most parts, apps “just work” at that scalemode. But every once in a while, I’ll run into one that doesn’t.

Take for example, ClipCache:

Notice how the toolbar icons are tiny! The app’s excellent and I use it all the time, but the developer, while still supporting it, isn’t all that responsive towards updates, unfortunately.

But, it turns out there are things to try that might just resolve these sorts of issues without resorting to code updates by the developers.

Find the EXE file for the app in question. In this case, it’s Clipc.exe.

Right click and choose Properties, then Compatibility:

Now click Change high DPI settings.

You may have to experiment with the settings here. In the case of ClipCache, I set the Program DPI to checked.

Then checked Override high DPI scaling behavior.

And finally, selected System (Enhanced).

I suspect other apps may require slightly different options.

In any case, restart ClipC and presto!

No more tiny toolbar!

Application Access – Part I

3
Filed under Uncategorized
Plastic Black Container With Many Tools Elevated View Of Plastic Black Container With Many Tools On Wooden Table toolbox stock pictures, royalty-free photos & images

I’ve been doing a lot of reflecting lately on how my typical workday progresses and one of my primary realizations is that I spend a lot of time switching between applications.

There’s all the typical development applications, Visual Studio, VSCode, Command line, GIT, Insomnia, Web browsers, file search, clipboard stuff, etc. There’s usually an instance or two of these running, and I often find myself ALT-TABing between them.

Then there’s various utilities that I use regularly but not necessarily constantly: putty, SSH, Fusion, Dbgview, etc. Find it, Open it, Use it, Close it, repeat.

And finally there’s all the other apps that hang out in the periphery: Word, Excel, Outlook, Zoom, Remote Desktop, VMs and so on.

Now, I’ve pinned a few of those to the taskbar, so they’re just a mouse click away. However, there’s only so much space down there. Sure, I could stack some in a folder, which would present as a menu, but then often used items would inevitably end up hidden behind one or more layers of menus.

Of course, there’s the Start menu. But after awhile, that becomes large enough to prevent any kind of speedy access. And then there’s the Start Panel, but again, it can begin to get unwieldy fairly quickly for me.

Plus, when customizing the Start menu, etc, there’s the issue of synchronizing changes between machines. Google Drive helps, but not really for the Start Menu or TaskBar.

As I hinted at above, part of my realization was that there’s three levels of application usage for me.

Utility Belt Apps

These are apps that I almost always have running. I need to switch between them quickly and seamlessly. Adam Savage, of Mythbusters and Tested fame, even has a term for it, which I completely forget and can’t seem to locate right now. Irony?

In any case, the idea is that you shouldn’t have to move any tool to get to any other tool. And I can’t think of a better way to describe Toolbelt level applications.

And for that kind of accessibility, you’re really talking about one thing; hotkeys.

Windows does have the ability to assign hotkeys to shortcuts, icons, etc. but the selection is pretty limited, and when you regularly work with applications like VSCode or Visual Studio, most of the typical hotkeys are already in use by those apps.

Further, if I have two or more instances of any particular Toolbelt app open, I need to quickly switch between those instances, not go Alt-Tabbing through every opened desktop window.

Toolbox Apps

These are those apps I use often but that don’t really deserve being added to my Path. For these, finding them is usually the most time-consuming part. They aren’t constantly in use, but none-the-less, I’d like them to be ready at hand. For instance, when you need to hunt down a library binding issue with a .Net application, I’m gonna reach for FusLogVw, but that app isn’t normally on the path, or easily locatable.

Junk Drawer Apps

Everything else, which I’m perfectly comfortable leaving in the Start Menu where they’re installed and digging them on when I need them. They’re not used enough to justify going on the Toolbelt or in the ToolBox.

How you break things down? Have I missed anything?

I’ll be posting more as I start to solve this problem.

Making CapsLock Relevant Again

8
Filed under Uncategorized

I’ve seen a few articles here and there about Capslock, but now I’d like to throw my own spin on the topic.

Capslock is probably the most useless key on modern keyboards. It’s an antiquated holdover from the days when typing was actually a quite physical activity.

But now, about the only time Capslock gets hit is by accident. It’s BAD FORM TO SHOUT THESE DAYS, after all.

So… what can we do about that?

Ctrl, Alt, Shift Oh My!

If you’re anything like me, you spend your days in a host of applications, all of which have various functions assigned to just about every conceivable combination of hotkey. There’s all the standards: Ctrl-V, Ctrl-C, Ctrl-X. There’s the Ctrl-Shift variants and the Ctrl-Alt variants. Then there’s the less common Alt-Shift variants.

And then there’s those sadistic Ctrl-Alt-Shift hotkeys that exist just to make sure if you didn’t already have carpal tunnel, you will soon enough.

But what if you could use that CapsLock key as another modifier key; a Ctrl2 if you will?

Suddenly, you have a whole smorgasbord of easy to type hotkeys available. Not to mention Shift-Ctrl2 and Alt-Ctrl2 options as well.

And sure, Ctrl2-Shift-Alt, Ctrl-Ctrl2, and, well you get the picture.

Macro Apps

Sure there are macro applications and hotkey applications out there. Plus, your favorite applications may already have customizable hotkeys built in.

But, they likely only support some combination of Ctrl, Shift and Alt for hotkeys, which doesn’t much help with repurposing that CapsLock key.

Remapping

The first step toward solving this problem is changing the CapsLock key to something , almost anything, else.

It turns out, that’s far easier than you might think. On Windows, you can actually remap virtually any key to any other key with nothing more than a registry entry and a reboot.

“Ugh!” you say. “Editing the registry!”. I get it.

Head on over to https://github.com/randyrants/sharpkeys, and install it right quick.

It’s a tiny little app that takes the guesswork and tedium out of editing the registry for this purpose.

Here’s the entry I used. This will make the CapsLock key act like an F19 key (yes, there’s actually far more function keys than just the F1-10, but most keyboards don’t have them).

Why F19? Meh. Seemed like a far enough out-of-the-way F key to not likely get mixed up with any application’s intentional use of a function key. Plus, it works easily with the technique I’ll go into below. But choose whatever you like. There’s F1-24, plus quite a few Unknown key codes as well that would probably work too.

Click the Write to Registry button and close, then reboot. And done.

When your PC comes back up, give it a try, press Capslock.

Nothing. Beautifully, blissfully, nothing! No capslock light coming on. No SHOUTING. Nothing.

But What IF I WANT TO SHOUT!

At this point, you’re probably asking yourself, “But what about Capslock?”

Grab a copy of AutoHotKey and create this script:

*F19::
    If (A_ThisHotkey == A_PriorHotkey && A_TimeSincePriorHotkey < 300)
    {
        If GetKeyState("CapsLock", "T") 
            SetCapsLockState, off
        else
            SetCapsLockState, on
    }
    return

Save it to a file called CapsLock.ahk. And then run it with AutoHotKey.

Now then, just double tap the CapsLock key, and, presto, that CapsLock light will beam its soothing green rays right into your eyes once more.

Double tap again to turn it off.

Hot Keys! Hot Keys! Hot Keys!

Ok, so getting the ability to shout again is nice and all, but there’s gotta be more than that.

And, Oh, there is!

That AutoHotKey app you’ve already installed? You’ve only just scratched the surface of what it can do.

How about making CapsLock work like the Ctrl key? Create another AHK script like this:

F19::LCtrl

Or how about CapsLock-N starting Notepad instantly?

F19 & n::Run Notepad

Or how about CapsLock-Insert appending selected text to what’s already on the clipboard

F19 & Insert::
   clip := Clipboard
   SendInput, ^C
   ClipWait
   clip := clip . Clipboard
   clipboard := clip 
   return

The sky’s the limit. Get familiar with AutoHotkey and you’re likely to find a ton of uses for it.

And with CapsLock now available as a completely new (and completely open) modifier key, you won’t have to worry about conflicting with the hotkey definitions of any other application.

Remote Desktop

I spend almost all day connected to remote machines via remote desktop. A wonderful follow-on benefit of this technique is that, since you’ve remapped Capslock on the host machine, even when you’re connected to a remote machine, Capslock will still map to F19, so the remote machine won’t see any CapsLock keypresses either.

It will, however see F19 keypresses. So, you have the option of deploying and running your AutoHotkey scripts on the remote machine, and they will see the F19 keypress exactly like scripts on the host machine, to be used in any way you see fit.

Lastly

If you’re still following along and all this sounds great, keep in mind that the ScrollLock and those number pad keys can all be remapped in the same fashion. Depending on your typically workflow, that may or may not make sense for you, but the process is exactly the same.

Macros in VS 2022?

0
Filed under Uncategorized

I’ve lamented Visual Studio’s lack of built-in macro support for ages. I tried a few extensions a while back but they never quite measured up.
But I just stumbled across Text Macros for VS 2019-2022.

It’s perfect for a quick, one-off Record/playback macro, you can save macros, edit them (although that’s not ideal as the macros are saved in a rather obtuse XML format), and even assign them permanently to hotkeys.

It’s only good for text editing macros, so you can’t use it to “automate” Visual Studio itself, but I’ve yet to have a need to do that.

Fixing VSCode’s broken Ctrl-Right

0
Filed under Uncategorized

I’ve been using VSCode for quite some time now. Generally speaking, I’ve been super happy with it. It’s ultra configurable, fairly light weight, very fast, and just generally a pleasure to work with.

Except….

They completely got handling of Ctrl-Right wrong. Try it in Word, try it in Notepad++, in Visual Studio, you name it, they all work a certain way.

But VSCode, not so much.

Now, it’d be easy enough to get used to it, if all my editors decided to change the default way they handle Ctrl-Right. But, yeah, no.

I’ve dealt with it for a while now but this weekend, I finally decided to have a look.

It took some Google-foo, but eventually I came across this post by Spongman that very accurately describes the problem.

I won’t repeat that here, but here’s the keybindings for VSCode that fix the problem.

    {
        "key": "ctrl+shift+right",
        "command": "-cursorWordEndRightSelect",
        "when": "textInputFocus"
    },
    {
        "key": "ctrl+right",
        "command": "-cursorWordEndRight",
        "when": "textInputFocus"
    },
    {
        "key": "ctrl+right",
        "command": "-cursorWordAccessibilityRight",
        "when": "accessibilityModeEnabled && textInputFocus"
    },
    {
        "key": "ctrl+shift+right",
        "command": "-cursorWordAccessibilityRightSelect",
        "when": "accessibilityModeEnabled && textInputFocus"
    },
    {
        "key": "ctrl+right",
        "command": "cursorWordStartRight"
    },
    {
        "key": "ctrl+shift+right",
        "command": "cursorWordStartRightSelect"
    }

It’s a bit tricky to get them installed in VSCode, what with the new Settings UI, but, once they’re there, Mwah! Perfection!

Rainmeter WebParser Problems

67
Filed under Uncategorized

A colleague recently pointed me to a fantastic little desktop customization app for windows, RainMeter.

He was using the lottaweather skin, so I pulled that as well, and I’ve found it quite nice to have a really clear forecast stuck right there on the desktop.

Beautiful Weather Skin

It’s tiny, quite capable, and is really easy to knock up a quick notification panel or whatnot based on a webservice, or so I thought.

At work, we’d recently been throwing ideas around about how to be reasonably notified of build failures and Pull Requests/Statuses.

Another colleague came across AnyStatus, which is quite nice in it’s own right, but I thought it’d be nice to have something in the same style as lottaweathers skin.

I’ll dig into the details of scraping azuredevops and jenkins later, but while putting things together, I ran into a vexing problem.

I had one measure that resolved the users azure guid “id” given their name and a different measure that requested all the Pull Requests where that userid was listed as a “reviewer”.

Pretty standard stuff for RainMeter, and the urls I was using worked just fine in PostMan, but not Rainmeter.

Actually, the UserID request worked, but not the Pull Request query.

Here’s the measure definitiion:

[MeasureMyReviews]
Measure=WebParser
Disabled=1
URL=https://azuredevops.blahblah.com/#organization#/#project#/_apis/git/repositories/#repository#/pullrequests?api-version=5.1&searchCriteria.reviewerId=[MeasureUserID]
Header=Authorization:Basic #AzureDevOpsPATBase64#

After WAY too much head scratching, I discovered the problem was two-fold.

  1. My measure referenced the UserID measure like so: [MeasureUserID] but that syntax doesn’t work in this context. In a URL definition, it needs to be [&MeasureUserID] (note the &)
  2. WebParser measures happen asynchronously, but in this case, the “MeasureMyReviews” has to happen AFTER the MeasureUserID. Otherwise, the userid hasn’t been resolved and will just be blank.

The fix was to set Disabled=1 for the MeasureMyReviews measure, then enable it in the FinishAction of MeasureUserID, like so:

[MeasureUserID]
Measure=WebParser
URL=https://azuredevops.blahblah.com/#organization#/_apis/identities?api-version=5.1&searchFilter=General&filterValue=#username#
Header=Authorization:Basic #AzureDevOpsPATBase64#
RegExp=(?siU)"id":"(.*)"
StringIndex=1
DynamicVariables=1
FinishAction=[!SetOption MeasureMyReviews Disabled 0][!UpdateMeasure MeasureMyReviews]

Note the two bang commands in the “FinishAction”

Sony XBR Tv showing Red Lines

0
Filed under Uncategorized

I’ve had a 65″ Sony HD TV for a while now and have really enjoyed it. The picture is incredible, especially with HD content, works well as a Chromecast target, the menus are completely usable, etc.

Still, it’s not like the 80″ HD projector screen I’d used going back years. Of course, with a projector, even a bright one, I still had to have the room mostly dark to really be able to see the screen well, and watching a projector during the day in a room with two skylights just isn’t particularly doable.

Hence the Sony.

Anyway, a week or so ago I happened on the chance to pick up an 85″ Sony TV and jumped on it. Checked it out before bringing it home and everything looked good, so we loaded it up.

Got it home, hooked it up and I’m seeing faint red lines across the screen.

Worse, on some screens (usually menus or computer generating fades/gradients) I’m seeing a LOT of red lines.

But they aren’t consistent.

Here’s a few shots.

Notice the red bits around the Hulu logo
An example of shading gone wrong
Another shading example
Here’s one of the faint vertical dashed lines

Here’s the thing. Most content actually shows perfectly fine.

At some points, depending on the image on screen, the vertical dashed red lines are either completely gone or barely visible.

My guess is that during the move, we torqued the tv too much or jostled it in some way that loosened a connector.

I don’t believe the screen is damaged, because the location of the lines changes depending on the image being shown.

Anyone have any ideas?