Binding backslash

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
onedoru
GamingTools Subscriber
Posts: 5
Joined: Sun Jan 20, 2008 2:30 am

Binding backslash

Post by onedoru » Tue Apr 08, 2008 10:17 am

Hi, first time poster here, I've been using InnerSpace for about 2 months now and would first off like to say I think it's an excellent product.

However, I've been experiencing small problem with binding any key combination which contains the backslash key, I've tried using the following syntax:

Code: Select all

bind -press \\ MyCommand
bind -press \ MyCommand
bind -press Ctrl+\ MyCommand
bind -press Ctrl+\\ MyCommand
These all yield a "bind failed" error on the console. Is there something I'm not understanding properly here regarding the escaping? If I issue "bind -keylist" it shows up on the list as a "\"

onedoru
GamingTools Subscriber
Posts: 5
Joined: Sun Jan 20, 2008 2:30 am

Post by onedoru » Tue Apr 08, 2008 10:24 am

Sorry, I missed out some stuff when I typed the code in the original post, I actually meant I was using syntax like:

Code: Select all

bind bindName -press \\ MyCommand
bind bindName -press \ MyCommand
bind bindName -press Ctrl+\ MyCommand
bind bindName -press Ctrl+\\ MyCommand 

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

Post by Lax » Tue Apr 08, 2008 3:11 pm

Code: Select all

bind -press bindname \\ mycommand
Enjoy :)

onedoru
GamingTools Subscriber
Posts: 5
Joined: Sun Jan 20, 2008 2:30 am

Post by onedoru » Wed Apr 09, 2008 3:37 am

D'oh... Okay let me first say I'm a moron and I should think carefully about my posts at 3am... Sorry to waste your time with that...

Of course you are right there Lax, I had the syntax wrong, but it appears I am having a different problem which I will try to explain more clearly now :D

I can bind backslash fine from a session using this code

Code: Select all

bind -press bindname \\ mycommand
What I am trying to do however, is have the binds performed from the uplink to an arbitrary session at any time... What fails for me (and works for other keystrokes other than those containing a backslash) is the following:

Code: Select all

uplink relay is1 bind -press bindname \\ mycommand
This is what yields the "bind failed" error... In fact, if I try this in the uplink, it also fails:

Code: Select all

relay is1 bind -press bindname \\ mycommand
What is even more strange is if I first do this in the session:

Code: Select all

bind -press bindname \\ mycommand
This works as expected and I see this on the console:

Code: Select all

[bindname] [\] Command (Press): mycommand
And NOW, when I try to do this:

Code: Select all

uplink relay is1 bind -press bindname \\ mycommand
The binding doesn't fail but it doesnt bind the proper keystroke, the console on the uplink says:

Code: Select all

[bindname] [] Command (Press): mycommand
Thinking that it might be some double-unescaping that might be occurring by sending the command via relay, I even tried

Code: Select all

uplink relay is1 bind -press bindname \\\\ mycommand
But this does something else wrong, the console then says:

Code: Select all

[bindname] [" "mycommand] Command (Press):
Is there some trick to escaping when relaying a bind command to a session that I'm missing here?

onedoru
GamingTools Subscriber
Posts: 5
Joined: Sun Jan 20, 2008 2:30 am

Post by onedoru » Wed Apr 09, 2008 5:50 am

Okay, I should have just persevered :shock:

I finally managed to figure it out, if anyone else cares to know, I managed to get it working like this:

Code: Select all

relay is1 bind -press bindname \\${String[\\]} mycommand
I managed to find the truth in this very good thread:
http://www.lavishsoft.com/forum/viewtop ... t=escaping

Thanks Lax for your quick reply earlier.

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

Post by Lax » Wed Apr 09, 2008 8:45 am

Well, part of the problem is using the uplink command to do the relaying. That's going to add another layer of unescaping, beyond the second layer needed for the relay command. Regardless of whether you're in a session or the uplink, just use the relay command. If you could point out where you got the idea you needed to use the uplink command to relay, perhaps I can update some documentation or edit a post or something.

From the uplink, OR from any given session, this command works (tested):

Code: Select all

relay is1 bind -press bindname \\\\ mycommand

onedoru
GamingTools Subscriber
Posts: 5
Joined: Sun Jan 20, 2008 2:30 am

Post by onedoru » Wed Apr 09, 2008 9:37 am

Okay, I thought I had to relay from the Uplink because when I searched the wiki it the command was listed under ISUplink:Relay. Also when I looked up the page IS:Session on the wiki, it lists session specific commands, but bind is not listed except for where it says:

'Uplink - Execute a command on the uplink, such as Name or Relay'

So I'm guessing together that gave me the idea that it was necessary. Hope that helps.

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

Post by Lax » Wed Apr 09, 2008 12:53 pm

Got it, thanks. I'll see that it gets cleared up :)

Post Reply