Using a Falcon-8 mini keyboard

Hi,

This is my first post here and I thought I'd make it an interesting one... (Well I think it is).

I've had KM for some months and never really used it but now I have an interesting use case and I would like a sanity check on how I'm using KM. There may be a simpler way to do what I want and if there is, I'd love to know.

I use a Mac with a UK PC keyboard, specifically a Filco Majestouch. This is an old school keyboard with clicky keys and no keypad. Used it for years and like it. I hate the Apple ones.

Before I upgraded to OS X Sierra I used Karabiner to map the various keys around as the Apple keymaps never seemed to be in the right place. Took a few hours to get right but once set, it worked a treat. OS X Sierra stops Karabiner from working and there is no short term replacement, Karabiner-Elements is not as good for me.

I need the UK PC keyboard as I use a KVm to switch between multiple machines. The KVM uses Scroll Lock to move between screens and cannot be reprogrammed. Been there, tried that, failed miserably.

So my situation now is, OS X Sierra won't recognise my UK keys very well, I need a PC keyboard as an Apple keyboard won't emit scroll lock keys, I have a couple of different genuine Apple keyboards and none of them do the Scroll Lock. So a bit of an inpasse.

Rang up a sensible UK keyboard company to see what they could suggest and they sent me a Falcon-8, an eight key programme USB controller. Apparently this can be programmed to emit Scroll Lock keys.

Fired up Windows 10, programmed it and it fails miserably to emit the Scroll Lock key sequence. Thats a problem for another day. However what I did do is program all eight keys to emit the Numeric keypad 1-8 keys, which I don't have on my keyboard.

Fired OS X back up and then loaded up Keyboard Maestro and checked that it could see the key strokes emitted by the USB keyboard, success it works.

My thinking is that Keyboard Maestro will be my USB programmer and I won't need to keep firing up Windows to flash the code down to the Falcon-8. So far it looks OK.

Now the interesting question. I want to have keys do different things depending on the application I'm focussed on.

As an example, when I'm in Xcode and press the USB key 1, I want it to run my program in Xcode.
If I'm not in Xcode, I want it to mute the music.

The example is contrived, but the principle is clear, well I hope it is :slight_smile:

To do this I created two new KM Macro groups

  1. Falcon-8 Macros

  2. Xcode short cuts

The first Macro group is ONLY available when Xcode is NOT running and has one Macro Mute Sound

The second Macro group is ONLY available when Xcode IS running and has one Macro, Run program, which is basically Command-R.

I had to create two groups as if I put the Mute macro in the Global Macro group, I got the Keyboard Maestro pallete appear when I pressed the USB Key whilst in Xcode. This pallete had Mute OR Run Command as options.

This appears to work OK, but seems long winded. Is there a better way to do this? I have read as much as I can but there's an awful lot to take in.

I did see this but its more hardware orientated.

Hope this is clear, would love to get the Falcon-8 being application specific in a sensible and easy way.

Rob

This is the normal way to do it in Keyboard Maestro. Macro Groups control when their contained macros are active.

Normally you would have the macro based on when Xcode is at the front, rather than just running, and the reverse condition if you want a macro group that is everywhere except Xcode.

An alternative way to set this up which might work better for you is to create a globally active macro that does:

Trigger: USB Device Key 1
Action:

  • Switch on text %Application%1%
    • Case Xcode:
      • Do stuff
    • Case BBEdit:
      • Do stuff
    • Otherwise:
      • Do stuff

You could have one such macro for each button.

Thanks for this. I hadn’t found the switch statement but thats clearly a better way to do it (you were far too polite to my original idea).

Am not next to machine at the moment, but will program that in when back later this morning.

That also has the advantage of not requiring two macro groups, is all encoded in one place and is self documenting, I use C and Perl so anything is self documenting compared to C and Perl :slight_smile:

I’m still getting my head around what to use the Falcom-8 for. I’m so used to a simple keyboard that having additional keys seems odd. However the concept of application sensitive keys seems really good.

I’ll report back so other people can take advantage of any macros I write (to at least the framework).

Rob

Peter,

This works well. I attach a screen shot of what I did so that other people can see how it works.

I've left in the alert so people can trace whats happening.

Thanks again for the prompt and helpful reply.

Rob

Just to be clear, this isn't a "better" solution, it's just a different solution.

As a general rule, it is better to have per-application macro groups and per-application triggers, and independently global triggers that do not conflict with per-application triggers.

The problem with this solution is that you now have one key that does one things most of the time, and something else in certain applications, which can become confusing. For example, after spending the day toggling mute, you go to Xcode and try to turn the volume on and accidentally run your program/

You're hitting issues with the normal solution only because you want a key to be both "something in all applications" and also "something else in some applications" which cognitively is problematic.

But all that said, Keyboard Maestro can do whatever you want it to do.

Peter,

I think I understand what you are saying. There are two different issues (IMO)

  1. the technical way to achieve this. using multiple Macro groups that focus around the application OR a single macro focusses around the hardware.

  2. Whether this is a good idea from a user experience or cognitive view.

I’m happy to take advice from people who know far more about KM than I do. From a programming point of view, it appears better to have things in one place, but as I explore KM more, I’ll get a better feel for it.

I do agree with your point on whether it is cognitively sensible/elegant/appropriate to map the same key to do different things in different apps. Generally speaking this is not a good idea, however the only person doing this is me and the scope of doing this is limited. I want to see how it all works and is it sensible for me to do it.

Rob

1 Like