Lack of info about the "hi" object

    Apr 16 2010 | 5:07 pm
    Hello, I have been looking for better information about the "hi" object. What I am after is using my keyboard, more precisely "Apple Internal Keyboard/Trackpad 3" as a HID device. Here is how far I have got in my investigation:
    The hi object outputs a number of lists for each keyboard action (pressing or releasing keys): normally 4 lists, but sometimes more. Lists common to each keypress seem to be one starting by "10", and where the second element is an 9-digit (sometimes 8-digit) integer, and another list starting by "17", where second element is always 0, until there are "too many" keys pressed simultaneously (too many can be between 3 and 6), then, second element is 1 and further keyOn actions won't have effect. The two other lists have their first element changing, one seems to be some kind of gate on/off indicator, the other could be 1 to 1 assignement to the keys, but i am not sure about it... The 9-number integer (second element of the list starting by 10) seems to sum up values in some way if there are more than one key pressed. So it seems to contain data for key combinations. However, pressing "qwe" doesn't give the same result as pressing "ewq", in the opposite order... Finally, the modifier keys only output 1 list, with 1st element that seems to be proper to each modifier, and second element meaning on/off.
    I understand everything is here to make a rather complex implementation, but there are just too many different parameters for going by guessing.
    The info I need does not come in hi help or reference, or in the HID tutorial. I searched the forum for "hi", no result which is strange.
    I hope someone can point me to some information.
    Thank you in advance, carloskleiber

    • Apr 17 2010 | 7:44 pm
      ...I would use this in a M4L context where plugin windows might take the focus away from the main Live window. And I'd like to go full automatic, not depending on selecting windows with the mouse. Otherwise I'd set with key and keyup.
    • Apr 18 2010 | 12:35 am
      Could you post some example combinations? Maybe we can guess at it.
      If there are that many unique key-combo integers (the 8 or 9-digit ones), you could trigger a ton of different things using simple words. Also wondering if the modifier keys change these combo values, which would add a lot more.
    • Apr 18 2010 | 4:34 pm
      Sure: here is "asddsa"
      (to simplify I do not specify if it is keyOn or keyOff: first time a letter comes means "On", the second time means "Off"
    • Apr 18 2010 | 4:38 pm
      Here is "asdasd"
    • Apr 18 2010 | 4:51 pm
      This is probably easier to understand: the two sequences side by side:
    • Apr 18 2010 | 4:53 pm
      I'd love to post longer sequences but I am limited by the vertical size of my max print window. Isn't there a way to copy/export the content of the window?
    • Apr 18 2010 | 5:47 pm
      Here are two comparable, 3-letter sequences, "ysxxsy" and "ysxysx".
      (on my qwertz keyboard "y" is the first key of the bottom row)
      This example illustrates the "overflow" after 3 key presses already, indicated by value 17 changing to 1 (or better said the list where 1st element is "17" has 2nd value changing to "1"). After this the hi object does not output anything until a key is released.
      Notice also the difference of the 2nd column, corresponding to the second releasing order: for the first key release action the hi object send out two complete "sets" of lists: