Gesture menu with different keyboard layouts

Gesture menu with different keyboard layouts

A dynamic game undergoing constant development and refinement, that attempts to balance playability with fresh and innovative features.

Moderator: Content Developer

Post Reply
Horazont
Posts: 4
Joined: 26 Apr 2010, 19:06

Gesture menu with different keyboard layouts

Post by Horazont » 24 Aug 2010, 21:11

Hi,

I probably just missed it, but is there a way to define completely custom keys for the build gesture menu?
I am learning some alternative keyboardlayout (neo2) and the keys for the circle menu are, well, spread over the keyboard, without the logic they have for qwert[zy].

greetings
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Gesture menu with different keyboard layouts

Post by CarRepairer » 24 Aug 2010, 22:53

Send us a link with an image of your keyboard layout, tell us which key you want as the center key and we'll make an option for you. It would only take a moment.
0 x

Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Gesture menu with different keyboard layouts

Post by Saktoth » 24 Aug 2010, 23:56

We should probably leave open the possibility for alteration here, any way to stick bindings in an easily editable file?
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Gesture menu with different keyboard layouts

Post by CarRepairer » 25 Aug 2010, 00:18

Saktoth wrote:We should probably leave open the possibility for alteration here, any way to stick bindings in an easily editable file?
It's already possible. The user can copy the marking menu config file from CA to their local LuaUI/Config folder, edit it, then finally set up the local widget config to read their local LuaUI. But that's not suitable for the common player so I figured adding more keyboard layouts built into the mod would be the nice thing to do (much easier for me than for them).
0 x

Google_Frog
Moderator
Posts: 2434
Joined: 12 Oct 2007, 09:24

Re: Gesture menu with different keyboard layouts

Post by Google_Frog » 25 Aug 2010, 09:12

This is why all these commands should be proper spring commands that can be bound to actions in uikeys.txt. This would require an "unsynced UI" command type.
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Gesture menu with different keyboard layouts

Post by jK » 25 Aug 2010, 09:14

Google_Frog wrote:This would require an "unsynced UI" command type.
What?
Widgets can add commands!
It's just car who is lazzy, I say him so often that he should use commands that it isn't funny anymore.
0 x

Google_Frog
Moderator
Posts: 2434
Joined: 12 Oct 2007, 09:24

Re: Gesture menu with different keyboard layouts

Post by Google_Frog » 25 Aug 2010, 09:21

What?
Widgets can add commands!
facepalm. I forgot they could add commands, it's been so long since I have added commands with a widget.

So now it's time for everyone to yell at car for not implementing it as a command.
0 x

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Gesture menu with different keyboard layouts

Post by Licho » 25 Aug 2010, 14:48

uikeys is no better than editable widget config file. Both are completely unaccessible to average nub.
0 x

Google_Frog
Moderator
Posts: 2434
Joined: 12 Oct 2007, 09:24

Re: Gesture menu with different keyboard layouts

Post by Google_Frog » 25 Aug 2010, 15:16

uikeys is centralised. It does not need to be accessible by average 'nub', it is so that when someone asks a question like this we can point them to a file and simple syntax for creating their own key setup.

If someone is competent enough to ask I think they are able to edit a simple config. The vast majority can still use defaults.
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Gesture menu with different keyboard layouts

Post by jK » 25 Aug 2010, 15:51

Also uikeys is deterministic, while using callins to catch hotkeys is NOT deterministic ,causing a lot conflicts.
0 x

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Gesture menu with different keyboard layouts

Post by Pxtl » 25 Aug 2010, 16:22

Google_Frog wrote:uikeys is centralised. It does not need to be accessible by average 'nub', it is so that when someone asks a question like this we can point them to a file and simple syntax for creating their own key setup.

If someone is competent enough to ask I think they are able to edit a simple config. The vast majority can still use defaults.
Plus, UIKeys means that any editor implemented for UIKeys will also function for this.
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Gesture menu with different keyboard layouts

Post by CarRepairer » 25 Aug 2010, 17:09

Google_Frog wrote:
What?
Widgets can add commands!
facepalm. I forgot they could add commands, it's been so long since I have added commands with a widget.

So now it's time for everyone to yell at car for not implementing it as a command.
I appreciate all the credit but it is actually Licho's widget, not mine.
Licho wrote:uikeys is no better than editable widget config file. Both are completely unaccessible to average nub.
+1
jK wrote:Also uikeys is deterministic, while using callins to catch hotkeys is NOT deterministic ,causing a lot conflicts.
Also true.
Pxtl wrote:
Google_Frog wrote:uikeys is centralised. It does not need to be accessible by average 'nub', it is so that when someone asks a question like this we can point them to a file and simple syntax for creating their own key setup.

If someone is competent enough to ask I think they are able to edit a simple config. The vast majority can still use defaults.
Plus, UIKeys means that any editor implemented for UIKeys will also function for this.
The problem is, while adding actions is a piece of cake in widgets, saving actions is not. There's a command that saves uikeys to some separate filename which I can't remember but it won't save over your uikeys. So the only thing I can do is save the actions in the widget's config or epicmenu's config and reload them each time.

Right now I'm just doing what jK considers a nono and that is catching hotkeys. I can fix it to use actions instead but as I said I'll still have to save these actions in the configuration, can't save them to uikeys which is a drag.
0 x

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Gesture menu with different keyboard layouts

Post by Pxtl » 25 Aug 2010, 17:29

Is there a way to check if a uikey exists for the action and only catch the hotkey as a fallback for the non-existence of the uikey?
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Gesture menu with different keyboard layouts

Post by jK » 25 Aug 2010, 17:33

CarRepairer wrote:The problem is, while adding actions is a piece of cake in widgets, saving actions is not.
Why?
You could just append the commands to the uikeys.txt
Or you could even generate a custom (CA only) uikeys.txt and load it each start.

Even removing commands is really easy, parsing the uikeys.txt is really not a problem.
0 x

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Gesture menu with different keyboard layouts

Post by Licho » 25 Aug 2010, 17:36

There is no easy way to read bindings?
It needs to know what its bound to to display it.
0 x

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Gesture menu with different keyboard layouts

Post by Pxtl » 25 Aug 2010, 17:38

@jK

Lua-coding a UIKeys.Txt parser seems like a very brittle approach to the problem.
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Gesture menu with different keyboard layouts

Post by CarRepairer » 25 Aug 2010, 17:49

For those who don't know I am currently saving hotkeys that the user can set up for menu buttons and checkboxes. I am doing it entirely in widget. I could cut out some of the code and save them as actions (which does some of the work of parsing modifiers - ctrl/alt/shift/meta, and the work of catching the hotkey of course). But I'd still have to save them and reload them, I'd still have to come up with logic if the user entered his own uikeys and decide what overrides what, and I don't see how it's beneficial for a user to type out stuff like

bind ctrl+alt+x somespecialcommand
bind alt+shift+e selectkeywidget_selectallairplanes

in their uikeys. What's the point?
0 x

User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Gesture menu with different keyboard layouts

Post by JohannesH » 25 Aug 2010, 18:41

Would be really nice to have keybinds in a widget, then you could have different sets for different games easier.

But probably most sensible to override the users UIkeys.txt, since they could do all they did there in the widget. Or if they want to use their uikeys they just disable the widget.
0 x

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Gesture menu with different keyboard layouts

Post by Pxtl » 25 Aug 2010, 19:23

@Car - I assume the idea is that at a future date a GUI tool could edit the UiKeys.Text file, and somehow check which mods have registered what commands. Then the CA keys would get keybinding for free, and it's better for the user too since the user can see all their keybinds in this hypothetical tool, not just the core Spring ones.

Imho, the UIKeys approach is important to support, but I'd still provide your default keyset as a fallback using the event-driven method... but jK seems to be saying that this is also doable through UIKeys.
0 x

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Gesture menu with different keyboard layouts

Post by Licho » 26 Aug 2010, 11:35

Imo its waste of time to focus on such things instead of solving real problems and finishing GUI. There is plenty of room for improvement but there is no point doing stuff for advanced users, if there is already alternate way to achieve same goal.
0 x

Post Reply

Return to “Zero-K”

cron