Everquest keyboard not working in background

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Sat Jan 19, 2008 9:40 am

Absolutely. Run this script:

Code: Select all

atom AxisMoved(string Axis, float Position)
{
  echo Axis=${Axis} position=${Position}
}

atom ButtonMoved(string Button, bool Position)
{
  echo Button=${Button} position=${Position}
}

atom DPadMoved(string DPad, float Position)
{
  echo dpad=${DPad} Position=${Position}
}

function main()
{
  Event[OnAxisMove]:AttachAtom[AxisMoved]
  Event[OnDPadMove]:AttachAtom[DPadMoved]
  Event[OnButtonMove]:AttachAtom[ButtonMoved]
  while 1
  {
    waitframe
  }
}
e.g. save it as buttontest.iss, then run buttontest, and when you want it to stop, endscript buttontest

And you can press all the buttons you want, it'll echo to the console what you changed. This script also outputs when directional pads on gamepads are pressed, as well as joysticks/accelerometers. I have to head out now, I'll be back later tonight to do some testing on this Num 5 stuff.

myxiplx
GamingTools Subscriber
Posts: 25
Joined: Fri Aug 31, 2007 4:16 pm

Post by myxiplx » Sun Jan 20, 2008 4:20 am

Aaaah, got it :)

Thanks for that script, helped a ton. I tested that to show that with numlock off it shows up as 'Clear', with it on as 'NUM 5', although 'Clear' isn't an option that appears in 'bind -keylist'.

Since IS is obviously picking it up, I then tried binding both 'NUM 5' and 'Clear' to the back command in my script, but even with that it doesn't work with numlock on or off.

And then I had a brainwave. If IS picks it up as 'Clear', do I need to pass the command as that too. Works a treat when you run the script as:

Code: Select all

bind -press num5 "Num 5" relay Lunnolax press -hold "Clear" 
bind -release num5b "Num 5" relay Lunnolax press -release "Clear"
Curiously however I can't do:

Code: Select all

bind -press num5 "Clear" relay Lunnolax press -hold "Clear" 
bind -release num5b "Clear" relay Lunnolax press -release "Clear"
So it seems IS is automatically replacing 'Num 5' with Clear internally when the bind is created, but is not doing that on the command side.

It works now though, and hopefully anybody else struggling with this would find it here. If I get chance tomorrow though I'll add this to the wiki.

myxiplx
GamingTools Subscriber
Posts: 25
Joined: Fri Aug 31, 2007 4:16 pm

Post by myxiplx » Wed Apr 23, 2008 3:02 pm

Somebody snuck a sneaky fix in with the last update ;-)

Keypad 5 now works with the expected syntax of:

Code: Select all

bind -press num5 "Num 5" relay Lunnolax press -hold "Num 5" 
bind -release num5b "Num 5" relay Lunnolax press -release "Num 5"  

myxiplx
GamingTools Subscriber
Posts: 25
Joined: Fri Aug 31, 2007 4:16 pm

Post by myxiplx » Wed Apr 30, 2008 3:42 pm

Nope, I spoke too soon. Can't get Num-5 working at all now (I had focus on the session before... d'oh).

Any suggestions?

4eak
GamingTools Subscriber
Posts: 5
Joined: Mon Jun 02, 2008 6:26 am

Post by 4eak » Tue Jun 03, 2008 11:10 am

I apologize for possibly being a thread-necro, but this appears to be a good place to get some help.

Similar to the original poster, I'm a first time user of IS who wishes to use keybroadcasting for multiple EQ sessions on a private server. Keyclone (and other keybroadcasters) have failed me, even with IS's "lock foreground" command. Wonderfully, IS is well equipped to broadcast keystrokes to my EQ sessions.

I've followed the directions posted, and I am receiving no results. I am brand new to IS, so clearly I'm missing something. Here are the exact steps I have used:

1.) Checked keyboard binds and duplicated the posted scripts in this thread (and tried variations later), saving as "keybindz.iss" in the script directory.
2.) Fire-up IS, right click on icon and mouse to Everquest tab
3.) Start 2 sessions of EQ-no patch (private servers)
4.) Login on both screens
5.) Right click IS icon and open the console OR use the tilde key to open the consoles in the EQ sessions themselves.
6.) Input command "Run keybindz" -- it appears to work. The console processes the script.
7.) I test keys in both games, and nothing happens. Not a single key is broadcasted.

What am I missing? Can you help me?

Thanks,
4eak

4eak
GamingTools Subscriber
Posts: 5
Joined: Mon Jun 02, 2008 6:26 am

Post by 4eak » Tue Jun 03, 2008 11:57 am

Double-post (don't see an edit feature).

When I use the "tilde" console on a particular session I am at least getting some results. The results are not what I need though. Take for example this script and 3 sessions of EQ:
function main()
{
bind A "A" relay is3 press "A"
}
I can "run keybindz" in the session consoles of is1 and is2, and when I push "a" in either of these sessions, "a" becomes broadcasted to is3, however, the keystroke "a" will never actually reach is1 or is2.

It appears these scripts replace a keystroke, and sends that keystroke to another targeted session instead. This is very nice, but it does not do what I need.

I am looking for synchronized broadcasting whereby I push "a" in is1, and "a" is broadcasted to all three sessions (is1, is2 and is3). I can only get a key broadcasted from one session to another, but not two or more sessions simultaneously.

How can I do that? I'm sure there is some syntax for it, but I can't find it. Something like this doesn't work:
bind A "A" relay is1 is2 is3 press "A"
Nor does this:
bind A "A" relay is1 press "A"
bind A "A" relay is2 press "A"
bind A "A" relay is3 press "A"
This one only broadcasts "a" to is3 (the last script command).

What is the best solution?


Thanks,
4eak

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Tue Jun 03, 2008 2:03 pm

When you execute the script, it takes hold in whatever particular instance you executed it in. So you can have different bindings in each session. This is why it worked when you hit those keys in the Uplink, but not in the sessions, and why it then worked from a given session when you used the ` key and ran it in each session.

Now, as far as how to send keystrokes to additional sessions, it is a matter of adjusting the commands being executed. It takes a bit of being clever and understanding what the command is.

Code: Select all

bind A "A" relay is3 press "A" 
There are 3 commands here, embedded inside each other. The first is the "bind" command, which binds a key action (press OR release) to a command (you can have a command for press and another command for release. Without specifying which, it defaults to press). You're naming the bind A, and it's being bound to the key sequence A, on press, and the command being bound to that event is relay is3 press "A". Here is [[ISKernel:Bind_(Command)|documentation for Bind]].

The relay command can relay a command to one or all sessions. The documentation for it is outdated so I can't link it, but you can replace "is3" with the word "all" and the command it sends will go to all sessions. In this case you are relaying press "A". Here is [[ISKernel:Press_(Command)|documentation for Press]].

4eak
GamingTools Subscriber
Posts: 5
Joined: Mon Jun 02, 2008 6:26 am

Post by 4eak » Wed Jun 04, 2008 10:50 pm

replace "is3" with the word "all" and the command it sends will go to all sessions
Perfect. This works great. I even dug up a few more gems from the forums.

Forgive my ignorance, I ask a lot of questions. Some of these questions are difficult for me to answer for myself because I have, for the next 2 weeks, a very limited amount of time in which to test Innerspace in a viable environment (I don't get my 2mbit connection until I move to my new house).

I see that "press" allows for combinations like "Ctrl+Alt+1", pressing and holding in succession until completion, whereby keys all are simultaneously released. I was wondering what the best way to have a several keystrokes pressed and released, each in succession from a single bind. For example:
Is1 pushes "A", which relays the following keys to Is2:

"enter"
"/"
"a"
"s"
"s"
"i"
"s"
"t"
"enter"

or perhaps there is a way to have "/assist" input all at once between the two enter keystrokes

I have another question, one that I cannot easily answer from the forums or wiki (thank you for your patience). I need an odd command/bind (for twisting on a bard). I need to push "A" in is1, and it needs to relay a looped and timed series of keystrokes to is2. Here is a basic process structure of what I need:

If Is1 pushes "A", then begin loop.

-Begin Loop

Is2 pushes "1"
pause 3 seconds
Is2 pushes "2"
pause 3 seconds
Is2 pushes "3"
pause 3 seconds

-Goto the start of the loop

If Is1 pushes "A" again, then break loop in Is2.
I realize it takes, as you say, a bit of being clever and understanding the commands, but I am not always very clever or knowledgable. To be honest, some of this is not intuitive for me, but I am eager to learn. I know your time is valuable, but if possible, can you provide some guidance for me again. I know that looking at an example code will go a very long way in teaching me.

Thank you,
4eak

Post Reply