use two qwerty keyboard.

max's icon

hi everybody,
i would use two qwerty keyboard in the same time in max.
but how can i have two keyboard send differents data to the key object (or other)?

thanks for your help

max

PhiDjee's icon

I had to do that once, and all I got was a 'big' keyboard.
So, it didn't work with two users at same time and I gave up :-(

Cheers,
Philippe

vade's icon

I believe someone at Share has done this, but rather thank using two
key objects, they used one key and a hi object (assuming hi
compatible USB keyboard). They had to find a map of the mappings for
the hi output values to the ascii equiv, which I believe is on the
list in the archives somewhere.

On Dec 27, 2006, at 7:20 PM, Philippe Gruchet wrote:

>
> I had to do that once, and all I got was a 'big' keyboard.
> So, it didn't work with two users at same time and I gave up :-(
>
> Cheers,
> Philippe

v a d e //

www.vade.info
abstrakt.vade.info

midiwhale's icon

I can see your problem, but as the OS probably doens't support keyboard "independence" either....

As one suggestion, if you leave the second keyboard in CAPS LOCK mode you will have at least 26 x 2 keys and I presume you can match it on ascii code or plain letter case. (or hold shift down for the other keys)

You can also buy programmable qwerty keyboards, usually used in EPOS systems, where you could define your own ascii key per key.
These live happily beside regular keyboards (I use one as my dedicated sequencer remote with ALT SHIFT SPANIEL as a plain key).

You might also find some USB keyboard driver that changes the qwerty keyboards to something else (ie midi)

I'm interested to know why you don't want to use two "MIDI" keyboards (on different midi channels) ? (You'd have 66+ x 2 keys then....) Or some other such controller/s.

max's icon

thanks for yours quicklies answers....
the CAPS LOCK mode it's very good idea . I must try but i think it"s ok.
i used two keyboards with a looper software i develop.i just an experiment for this time.

Thanks a lot

Peter Castine's icon

On 27-Dec-2006, at 19:02, max wrote:

> i would use two qwerty keyboard in the same time in max.
> but how can i have two keyboard send differents data to the key
> object (or other)?

Probably you need to re-write the OS keyboard drivers. They are
deliberately designed to allow you to alternate between different
keyboards to, for instance, use different keyboard layouts for
different tasks.

-------------- http://www.bek.no/~pcastine/Litter/ -------------
Peter Castine +--> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

vade's icon

Are you certain about that? An acquaintance from Share (http://
share.dj) performed with lloopp with a custom 2 keyboard setup using
an HID usb keyboard (just another Apple USB standard keyboard). I
recall, because he specifically asked me about the hi output -> asci
conversion, and did not know the answer. A week later at share they
had it working via some help from this very list.

*shrug* I dont do that much drugs to have made that up. Ill see if I
cant get more info this sunday if it hasn't been resolved.

On Dec 27, 2006, at 10:43 PM, Peter Castine wrote:

> On 27-Dec-2006, at 19:02, max wrote:
>
>> i would use two qwerty keyboard in the same time in max.
>> but how can i have two keyboard send differents data to the key
>> object (or other)?
>
> Probably you need to re-write the OS keyboard drivers. They are
> deliberately designed to allow you to alternate between different
> keyboards to, for instance, use different keyboard layouts for
> different tasks.
>
> -------------- http://www.bek.no/~pcastine/Litter/ -------------
> Peter Castine +--> Litter Power & Litter Bundle for Jitter
> Universal Binaries on the way
> iCE: Sequencing, Recording &
> Interface Building for |home | chez nous|
> Max/MSP Extremely cool |bei uns | i nostri|
> http://www.dspaudio.com/ http://www.castine.de
>
>

v a d e //

www.vade.info
abstrakt.vade.info

Peter Castine's icon

On 27-Dec-2006, at 23:12, vade wrote:
> Are you certain about that?

Mac OS has supported multiple alternative keyboards since the
introduction of ADB about 20 years ago. The usurpation strategy used
is documented in Inside Macintosh and was continued with USB. That
strategy did not provide applications with any information
identifying the source of a keystroke if multiple keyboards are
involved. A keystroke is a keystroke is a keystroke is a keystroke.
Look at the EventRecord data structure.

It may be possible to override the standard strategy with HID. I
didn't think any USB keyboards were HID, but on that point I will
confess not to have authoritative information.

-------------- http://www.bek.no/~pcastine/Litter/ -------------
Peter Castine +--> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

i.m.klif's icon

It is vary easy using HID, as HID recognises individual devices,
regardless of any special drivers. I found that the easiest way to
"take over" the machine is to use HID to claim the mouse and keyboard.

Very stupid situation when you test this using both keyboard and
mouse, and forget to implement some kind of escape mechanism - no
way to quit, no way to restart - you can only pull the plug :)

grg's icon

Am 28.12.2006 um 11:13 schrieb klif:
> It is vary easy using HID, as HID recognises individual devices,
> regardless of any special drivers. I found that the easiest way to
> "take over" the machine is to use HID to claim the mouse and keyboard.
>
> Very stupid situation when you test this using both keyboard and
> mouse, and forget to implement some kind of escape mechanism - no way
> to quit, no way to restart - you can only pull the plug :)

Hi klif,

could you elaborate how you did this? I mean the "take over" part?

Getting external keyboards to be recognised only via HID and not as key
events by the OS is something I'm very interessted in ... I got a
somewhat working solution (limited testing), but it involves patching a
binary kext, and is very OS and hardware specific (works with 10.3.9
and ibook w. internal ADB keyboard) ... any easier solution?

thanks, g.

i.m.klif's icon

>
> Hi klif,
>
> could you elaborate how you did this? I mean the "take over" part?
>
> Getting external keyboards to be recognised only via HID and not as
> key events by the OS is something I'm very interessted in ... I got
> a somewhat working solution (limited testing), but it involves
> patching a binary kext, and is very OS and hardware specific (works
> with 10.3.9 and ibook w. internal ADB keyboard) ... any easier
> solution?
>

Uh, wrong again :( I don't have max licence at my home computer
that i use to check mail, so I can't test directly.

Some time ago, or maybe it was using 3rd party Hi object, choosing
keyboard or mouse would disconnect it from the system (it might have
been in OS9). I did some quick testing now (using Hi.help and 4.5.7
Runtime), and as i said, i was wrong. Keyboard and mouse are
recognised but are at the same time used by the system as usual.

However, there is one other interesting side effect - using keyboard
as Hi device, enables it as keylogging across the system. As i type
this, max window gets the events! Including user password as i type
it in System preferences!

10.4.8, Max 4.5.7, PB Titanium 400

klif

Stefan Tiedje's icon

vade wrote:
> I believe someone at Share has done this, but rather thank using two
> key objects, they used one key and a hi object (assuming hi
> compatible USB keyboard).

You have to use two hi objects probably, as hi can differentiate and the
OS doesn't want to...

Peter Castine wrote:
> It may be possible to override the standard strategy with HID. I
> didn't think any USB keyboards were HID, but on that point I will
> confess not to have authoritative information.

The hi object is the authoritative...
in the help file fill the menu and the keyboard will show up... (at
least on my Powerbook...)

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

daemo79's icon

I was curious how i can control keystrokes from max whilst having ableton live open? im using usb keypad to trigger. My max window receives whilst in text edit and in ableton, but it wont trigger the sounds until i go back to max window.

-Why you may ask, i was attempting to build a external trigger using numkey pad, so i dont have to buy nor lug drum trigger pads and a midi module, i thought i had it sorted, but now i dont.
Im new to computers and new to max.

chur
d