Author Topic: Linux "marco" keyboard  (Read 4666 times)

0 Members and 1 Guest are viewing this topic.

Offline mklein

  • Thread Starter
  • Posts: 7
  • Location: Treehouse
Linux "marco" keyboard
« on: Tue, 16 April 2013, 15:47:15 »
Hello all,

I'd like to explore the possibility of adding a second keyboard to some Linux systems that would essentially function as a "macro" triggering keyboard - to automate some programming tasks, perform desktop transformations, locate certain active windows, etc.

I can handle the coding side, but I'm not sure what type of keyboard I should get so as to get a different set of signals (scancodes?) from the main keyboards. I'd rather not write a custom USB/HID driver if at all possible, so I was hoping to find something that already had a ps/2 or AT interface. Any suggestions on the best way to go about this?

(I currently use use various Model M's, in case that makes any difference.)

-m

Offline CommunistWitchDr

  • Posts: 479
  • Location: St. Louis, MO
  • >implying keyboards
Re: Linux "marco" keyboard
« Reply #1 on: Tue, 16 April 2013, 15:51:09 »
Perhaps a programmable keyboard (like a gh60) or keypad (like that one cherry one) would be the best for the situation.

Offline mklein

  • Thread Starter
  • Posts: 7
  • Location: Treehouse
Re: Linux "macro" keyboard
« Reply #2 on: Tue, 16 April 2013, 15:56:47 »
I just assumed those let you change key locations around - do they let you define all of the key codes internally, and then just pick them up using xev & company?

Offline cpf

  • Posts: 14
Re: Linux "marco" keyboard
« Reply #3 on: Tue, 16 April 2013, 16:00:37 »
Hello all,

I'd like to explore the possibility of adding a second keyboard to some Linux systems that would essentially function as a "macro" triggering keyboard - to automate some programming tasks, perform desktop transformations, locate certain active windows, etc.

I can handle the coding side, but I'm not sure what type of keyboard I should get so as to get a different set of signals (scancodes?) from the main keyboards. I'd rather not write a custom USB/HID driver if at all possible, so I was hoping to find something that already had a ps/2 or AT interface. Any suggestions on the best way to go about this?

(I currently use use various Model M's, in case that makes any difference.)

-m

With some software trickery you should be able to differentiate input between the two keyboards. On windows it requires moderate WinAPI shenanigans, but it's not impossible, so I'm sure you could do the same in *nix.

Offline mklein

  • Thread Starter
  • Posts: 7
  • Location: Treehouse
Re: Linux "marco" keyboard
« Reply #4 on: Tue, 16 April 2013, 16:23:00 »
Would the codeset (that's probably not the right keyboard lingo) of the second keyboard make any difference in this use case - for instance if it was a POS or 3270 terminal, another programmable unit as mentioned in a earlier post?

Offline IvanIvanovich

  • Mr. Silk Underwear
  • Posts: 8199
  • Location: USA
Re: Linux "marco" keyboard
« Reply #5 on: Tue, 16 April 2013, 16:49:12 »
For ease I would reccomend hardware programmable pad like a genovation 683, a smaller Access-IS or Tipro. Sometimes you can find them used for a reasonable price. You can assign anything you want, multiple key strings and since it's save in hardware in the keypad you can move it from pc to pc.

Offline mklein

  • Thread Starter
  • Posts: 7
  • Location: Treehouse
Re: Linux "marco" keyboard
« Reply #6 on: Tue, 16 April 2013, 18:43:07 »
OK, it sounds like that is the way to go.

Thanks to all for the comments - great site.

Offline davkol

  •  Post Editing Timeout
  • Posts: 4994
Re: Linux "marco" keyboard
« Reply #7 on: Tue, 16 April 2013, 21:07:46 »
You can easily remap scan codes on udev level. I recommend to check out Pystromo, it's the simplest way to do so. Almost any USB keyboard (e.g. very cheap A4Tech X7-G100) will work then, because different devices are recognized by their HIDs on this level. Beware that many (if not most) programmable keyboards are not programmable on the fly, actually they often require 32bit MS Windows on a PC with a dedicated PS2 port.

Offline brighenne

  • Posts: 276
  • Location: Long Beach, CA
Re: Linux "marco" keyboard
« Reply #8 on: Tue, 16 April 2013, 22:53:37 »
Nobody has said polo in response to the thread title yet, so here I am.

"Polo."



I do like the thought of a standalone macro board; I always hate having them attached to the board permanently.

Offline mklein

  • Thread Starter
  • Posts: 7
  • Location: Treehouse
Re: Linux "marco" keyboard
« Reply #9 on: Tue, 16 April 2013, 23:10:50 »
I took a quick tour through Pystromo, which appears to handle everything that I was trying to avoid having to code myself. I like the idea of just using one of those el'cheapo USB keypads w/o worrying about unwanted collision codes with the m's (and it'll keep me from going off of the deep end with too many buttons...at least for the time being.) Great find, thank you.

Offline CeeSA

  • Posts: 341
  • Location: Germany
Re: Linux "marco" keyboard
« Reply #10 on: Wed, 17 April 2013, 04:54:52 »
Tipro is very powerful, but you have to programm the controller under windows. If the connecter is PS/2, you have to use windows 32Bit.

Maybe this one is something for you http://www.ebay.com/itm/2-TIPRO-SHS-KM032E-001-KEYBOARD-/281094117260?pt=LH_DefaultDomain_0&hash=item417283d78c

Offline mklein

  • Thread Starter
  • Posts: 7
  • Location: Treehouse
Re: Linux "marco" keyboard
« Reply #11 on: Wed, 17 April 2013, 08:40:45 »
Yeah, I looked at that model. Another seller has some priced ~10, so I did a little research and (coming from the only info I could find) they seem to be made for exclusive use as extensions to Tipro controller units and talk via their own comminications protocol. It actually sounded like the poor bloke cooked his when trying to plug it into a ps/2 port using a hacked cable. Anyhow, if someone knows this to be incorrect please let me know.

As things stand I'm going to track down a dollar-store usb keypad to see if I can get it operational using the s/w that davkol suggested. 

Offline digitalleftovers

  • Posts: 645
Re: Linux "marco" keyboard
« Reply #12 on: Wed, 17 April 2013, 09:42:54 »
There was a time when I thought I wanted a keypad too, but then I discovered that with some key combinations, you can do quite a lot.  I use awesomeWM on ubuntu, and using the meta keys to bind just about any combo imaginable, I've never run into any collisions with other apps.  Awesome has a lua config file where you can add any bindings that you want.  As far as programming shortcuts and macros into a keyboard (changing the scan codes) that seems best suited to situations where you need to move between computers.
Keyboards:
Filco 104 MX Brown (Otaku) - FKBN104M/NPEK 黒い空
Ducky TKL MX Brown/Blue 80% (White) - 1087-F 白の空
KBC Poker MX Red with PBT Key Caps - PFCN6000


"Consumers use touch screens.  Producers use keyboards."

Offline CeeSA

  • Posts: 341
  • Location: Germany
Re: Linux "marco" keyboard
« Reply #13 on: Wed, 17 April 2013, 09:54:39 »
in "my" ebaylink has the board the controller onboard. You could check it in the pic 4. There is a "filled" PS/2 connector.

A Tipro cabel is not really special: http://deskthority.net/wiki/Tipro_Cable
You could make one by yourself easily.

If you buy one, you have 4 Layers to program. I wish every keyboard comes with this controller.

Offline mklein

  • Thread Starter
  • Posts: 7
  • Location: Treehouse
Re: Linux "marco" keyboard
« Reply #14 on: Wed, 17 April 2013, 17:34:01 »
digitalleftovers - I'm of the same opinion with it comes to actually programming the keyboard, as I don't really see myself moving the thing from one computer to another. I just want something where I can set some dedicated keys to perform some intelligent operations - be it pulling a window to front-and-center, or running a reload on a server proc. One of my biggest issues is getting a handle on the different syntax interpretations among (linux) apps - use ctrl+c in one app to copy, use it in the wrong app and your session is canceled...after several of these my little brain starts to think there's got to be a better way. I'll pick up a cheap keypad and see how it goes. If it works out well then maybe I'll recombine them using some flavor of 3270 with its 24 fn keys.