Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What I would like is this:

I would have two keyboards. One of them is "connected" to Matlab, the other is "connected" to my text editor of choice. This way, I could edit some script and still test some commands in Matlab without having to constantly switch between the applications.

Basically, I would want to have an additional keyboard attached to my computer that solely controlled Matlab. That would be awesome!

Is there any way to do this? Preferably with OSX, but it would be fun on Windows or Linux, too.

share|improve this question
1  
interesting question. definitely not what's envisioned in our current "multitasking" operating systems, but i don't know that that means it's not doable. personally i suspect that it's doable, but won't be pretty. –  quack quixote Dec 1 '09 at 22:46
    
Ditto, re "won't be pretty." Keyboards and mice aren't visibly/publicly "identified" like hard drives or printers; they just "are". –  JMD Dec 1 '09 at 23:08
1  
It might not be possible in Unix - at least according to this: stackoverflow.com/questions/285716/… –  Jason R. Coombs Dec 1 '09 at 23:21
3  
In searching for an answer, I've found that searching for "trap barcode" is a good search - because many barcode readers (especially the wedge type) are indistinct from keyboards... and many users want to direct this input to a specific application. –  Jason R. Coombs Dec 1 '09 at 23:24

5 Answers 5

If you are a system programmer, then it should be easy for you to get this functionality. Steps using AutoHotKey script for Windows:

  1. Make an AutoHotKey script that can detect keystrokes on different keyboard,
  2. Then using windows handle, get the winID for both programs
  3. Map different keyboards to different WinIDs

I had done the similar function for controlling my music player even my active window was VS-2010/MatLab/ or any other window.

share|improve this answer
    
I am new to AutoHotKey. Can you share your script please? –  Shitikanth Apr 17 '13 at 0:22

I don't know if you can do this natively. I've never seen this, but I'd love to have this functionality.

One hackish solution is to use something like VMWare and to run Matlab in the virtual machine and "connect" the second keyboard to the virtual machine. It's less than elegant, but should work.

share|improve this answer
    
this is what i was going to suggest. –  Roy Rico Dec 1 '09 at 22:57
    
Also, it would probably be a bit painful to make them work in the same directory. Perhaps using a network share over the virtual network –  bastibe Dec 2 '09 at 1:28

It looks like TeamPlayer might be a product for Windows that does what you're looking for.

share|improve this answer
    
I wonder if TeamPlayer supports the focus switching that would be necessary for my vision to work. Every mouse/keyboard would need their own focus or all input will be redirected to the currently active window. –  bastibe Dec 2 '09 at 1:33

If you have multiple monitors, you can run different X servers for each monitor in linux and manually specify the keyboard/mouse devices which each server uses. This allows you to log on twice, load matlab in one screen and your editor on the other, and have separate mouse/keyboards for each.

share|improve this answer

The easiest way to do this would be to have one computer for the text editor and another computer for the Matlab. However, switching between keyboards might actually be more work than it is to switch between windows using your mouse. Or you could always use the alt-tab functionality in Windows which will let you switch between windows much quicker.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.