News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 389
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 183
Total: 183

Author Topic: Keybinding Issues  (Read 2258 times)

0 Members and 70 Guests are viewing this topic.

Keybinding Issues
« on: »
Hey there, lolesch here with a new problem I could not find any info about out there...

So I was working on UI elements and I thought about the keybindings possibilities to control these menus. When I hit "I" it opens my Inventory and so on.
They are preset here: ...\MEDIA\KEYMAPPING\KEYBIND.DAT
Code: [Select]
[KEYBINDS]
[KEYBIND]
<STRING>NAME:QUICKSAVE
<TRANSLATE>DISPLAYNAME:Quick Save
<STRING>KEY:F11
<STRING>MODIFIERKEY:CTRL
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[/KEYBINDS]
and you can easily add whatever you want.
Code: [Select]
[KEYBINDS]
[KEYBIND]
<STRING>NAME:MapToggle
<TRANSLATE>DISPLAYNAME:Map toggle (Center)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapToggleLeft
<TRANSLATE>DISPLAYNAME:Map toggle (Left)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapToggleRight
<TRANSLATE>DISPLAYNAME:Map toggle (Right)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapHold
<TRANSLATE>DISPLAYNAME:Map hold (Center)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapHoldLeft
<TRANSLATE>DISPLAYNAME:Map hold (Left)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[KEYBIND]
<STRING>NAME:MapHoldRight
<TRANSLATE>DISPLAYNAME:Map hold (Right)
<BOOL>EXCLUSIVE:true
[/KEYBIND]
[/KEYBINDS]
source: map keybinds mod by Jaex

So far so good! Now as you can see Jaex left out the "<STRING>KEY:     "
They show up in the settings with "NA" values and you have to set the key on your own.
I figured out that the mod crashes when things are double set (conflict between old and new keybinds) so I assume leave them blank is a good point here.

Now to the problem: ignoring the just sayed I WANT TO preset four new Keybindings with the "arrow keys" and I cant get them set up. I've tested the following spellings:
left arrow
left_arrow
LEFT ARROW
LEFT_ARROW
arrow left
arrow_left
37 (Javascript Code wich is used in the local save file for keybinding changes you do - located here: ...\My Games\Runic Games\Torchlight 2\KeyBindings.DAT)

The result is always the same, it only shows the first letter or number (so javascript has to be wrong here) .... HELP!

Back to the UI element: Under "Logic" you can find the KeybordInput objets with these parameters:
Code: [Select]
[BASEOBJECT]
[PROPERTIES]
<STRING>DESCRIPTOR:Keyboard Input
<STRING>NAME:Left
<INTEGER64>ID:687351159822867062
<INTEGER64>PARENTID:6264640040022118013
<STRING>KEYS:37
<STRING>KEY BINDING:LEFT_ARROW
[/PROPERTIES]
[CHILDREN]
[/CHILDREN]
[/BASEOBJECT]

Has anyone used them already and how? I've linked them within my logic and AFTER setting my keybindings from "NA" to arrows (YES, in game its possible!!!) they work fine.

Is there another code for arrow keys I dont know about?

cheerio
lolesch
« Last Edit: February 11, 2017, 10:07:36 pm by lolesch »
some projects in progress

Share on Bluesky Share on Facebook


Re: Keybinding Issues
« Reply #1 on: »
after another research I found these to test tomorrow:
key_left
left key
WM_KEYLEFT
VK_LEFT
GLUT_KEY_LEFT

EDIT: all not working -> only the first letter shows up
« Last Edit: February 12, 2017, 07:18:25 am by lolesch »
some projects in progress

Re: Keybinding Issues
« Reply #2 on: »
hmmm it's also possible it might be a regional keyboard thing  :o


Re: Keybinding Issues
« Reply #3 on: »
hmmm it's also possible it might be a regional keyboard thing  :o
I dont think so, in guts and the InGame options I can insert the arrow keys (with my regional Keyboard), but within the Keybindings.DAT I need the code of these keys so I dont have to insert them on my own.
As described - in the keybindings save file they use Javascript (Key 37 - 40) but thats the wrong code for the file I'm modding on...
some projects in progress

Re: Keybinding Issues
« Reply #4 on: »
In any case, you can always use screen buttons.

I suppose, new hotkeys you want to use to move the UI Menu with your stat-tree? For these purposes you can use a mouse movement in a certain area - screen borders.

Re: Keybinding Issues
« Reply #5 on: »
with mouse entered and leave?
and a logic to show/hide or even a timeline movement?

I've set up something like that, anyways I was thinking about using the Arrow Keys to move between menus. Do you know the Skyrim menu? that is my inspiration, lets see how far I can push it
some projects in progress

Re: Keybinding Issues
« Reply #6 on: »
with mouse entered and leave?
and a logic to show/hide or even a timeline movement?
Yeah, you can use timelines in this manner. I think it's possible. Earlier I wanted to do something like this.

 

Recent Topics+-