unbinding ctrl+a

unbinding ctrl+a

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Renofox
Posts: 25
Joined: 04 Jan 2007, 20:45

unbinding ctrl+a

Post by Renofox »

I'm having trouble unbinding ctrl+a in the new uikeys.txt. As far as I've understood, this should be how its done:

Code: Select all

unbind Ctrl+a select AllMap++_ClearSelection_SelectAll+
The goal would be to replace it, so ctrl+a would instead select all units of same type as those in selection.

Code: Select all

bind Ctrl+a AllMap++_InPrevSel_SelectAll+
This far, there's something wrong with the unbinding, as even without the rebinding line the ctrl+a hotkeys work normally. I also tried removing the selectkeys in case it was affecting things, but it had no effect either.

So, how do I unbind the select all key?
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: unbinding ctrl+a

Post by Jazcash »

Try just this instead:

Code: Select all

unbind Ctrl+a select
User avatar
Renofox
Posts: 25
Joined: 04 Jan 2007, 20:45

Re: unbinding ctrl+a

Post by Renofox »

Jazcash wrote:Try just this instead:

Code: Select all

unbind Ctrl+a select
It works! I'm still surprisingly stumped by the binding part as well. I have tried bind Ctrl+a AllMap++SelectAll_InPrevSel+ bind Ctrl+a and AllMap++InPrevSel_SelectAll+, but how should selecting unit of types in InPrevSel from AllMap?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: unbinding ctrl+a

Post by Beherith »

bind ctrl+a select AllMap+_InPrevSel+_ClearSelection_SelectAll+
User avatar
Renofox
Posts: 25
Joined: 04 Jan 2007, 20:45

Re: unbinding ctrl+a

Post by Renofox »

Beherith wrote:bind ctrl+a select AllMap+_InPrevSel+_ClearSelection_SelectAll+
Thanks! It worked, and I even managed to add _Not_ManualFireUnit to remove commander from the selection.

Now I'm baffled by how to do the same for visible units only. I have removed the previous keybinding from ctrl+z, yet the Visible keyword doesn't prevent selecting units beyond the visible area:

Code: Select all

unbind Ctrl+z  select AllMap+_InPrevSel+_ClearSelection_SelectAll+

bind ctrl+z Visible+_InPrevSel_Not_ManualFireUnit+_ClearSelection_SelectAll+
Post Reply

Return to “Lua Scripts”