Wednesday, July 25, 2012

Sharing a keyboard and Mouse between a Mac and PC

My main development box is a beefy dual screen PC. I do a lot of Mac work too. I test all our WebStart Java based code on the Mac to make sure controls are sized correctly, accelerator keys work as intended etc. That is all done with IntelliJ. I also write all the mobile code for iOS devices via Xcode and Android devices via Eclipse meaning I switch around a lot.

I tried VNC for a few days but ran into too many short comings. I have the Mac hooked up to my second LCD and switching video inputs is easy enough but hauling over the mouse and keyboard was annoying.

Yesterday over lunch I picked up a KVM at Microcenter. Box listed it at $29.99 but it rang up at $12.99 at the register. This is the TrendNet 2-port KVM Switch Kit TK-207K. Simple piece of hardware about the size of a deck of cards, just a little thicker and wider. I plugged in my USB generic mouse and MS Natural Keyboard 4000 to the device and plugged in the included outbound VGA (not using) / USB cables to the PC and the Mac. There is a 1 and 2 button on top of the box you press to toggle between machines. If I am on the PC I can hit Scroll Lock twice to go to the Mac but it does not appear to work from Mac back to PC, instead it dims the screen. Press the button is no big deal.

Both machines seem to be happy doing the switch. I can now run everything off the one mouse and keyboard which is making life much simpler. The other big advantage - the MacBook Pro only has two USB ports. I had the mouse in one and the keyboard in the other. I only need one for the KVM switch. This allows me to plug in a USB key, the iPad or whatever without pulling the keyboard.

Here are the minor issues:

1) On the Mac the main screen in the laptop screen. Everything wants to start on that screen even if a program is on the second screen it wants to show pop-ups / associated windows on the primary screen.

2) Just put Lion on the Mac so I could upgrade to latest Xcode. By default Lion does scrolling opposite of what Snow Leopard did. This makes it act like a iOS device which is fine when using touch pad but annoying when using mouse especially when you switch between it and Windows during the day. I turned off that setting.

3) Can't double scroll lock to switch back to PC side.

4) Wish I could run both my external LCD screens of the Mac even if it meant shutting down the laptop display. If that worked I could switch to just using the Mac for email, IM, IntelliJ for Java, Eclipse for Android and Xcode for iOS. The laptop display is OK but not positioned on my desk in a good spot right now. Once you get used to two 24" displays you don't want to go back to a 15" display.

Switched text editors


I had been using PSPad on the PC for the longest time. I then switched to NotePad++ and then after reading a number of glowing reviews of Sublime Text 2 I switched to that. Seems to work out nicely on both the PC and Mac. I had been struggling to find a good text editor on the Mac and was using JEdit. Using the same editor on both machines is very handy.

I tend to leave a text editor open on my machine at all times with multiple tabs going. Right now I have 5 tabs running - Work info, Android Notes, Charge Capture Mobile, Front Office, Tablet Calendar - one for each project I am in the middle of working on. During the day if someone stops by with a suggestion I type it right into the appropriate file. Maybe I come up with some wild idea - type it in. It is my way of keeping massive to do list, future notes, things to investigate and random thoughts all where I can find them easily.

The Mac will take over my Tablet Calendar notes as that is where I will be doing that work for the time being until I start the Android conversion. I also end up opening source code from other projects to steal code snippets so having a bonus text editor open is very handy. Its other big job is grep. Any text editor must have "find in files" to be useful to me.

No comments:

Post a Comment