Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 1, 2011, 12:08   #1
Timo Pietilä
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,093
Timo Pietilä is on a distinguished road
Keymap documentation?

I just started to edit my 30+ macros / class to keymaps and found out that I don't know the right syntax for them.

What are {K} {MK} {^K} etc.?

Is there any documentation of how to edit keymaps?
Timo Pietilä is offline   Reply With Quote
Old June 1, 2011, 14:56   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,876
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Timo Pietilä View Post
I just started to edit my 30+ macros / class to keymaps and found out that I don't know the right syntax for them.

What are {K} {MK} {^K} etc.?

Is there any documentation of how to edit keymaps?
So there's no documentation yet, I'll get some sorted before 3.3 releases.

So for each character, you can have a modifier: {K} means keypad, {M} means meta, {^} means control, {S} means shift. Non-alphanumic keys are in [], like [Return] or [F4]. This means that you can map to keys like {^S}[F3]. If you have an alphabet key with no modifers except control, you can skip { and just write ^, like ^S. If you have copy of the source, you can see the names of keys between [] in ui-event.c.

Please tell me if you need more/less help, I'll be happy to provide it (but only after the weekend, though, I'm going away tomorrow).

EDIT: I had {C} meaning shift - it doesn't, {S} does.
__________________
"Physician, heal thyself."

Last edited by takkaria; June 1, 2011 at 15:16.
takkaria is offline   Reply With Quote
Old June 1, 2011, 15:13   #3
jens
Swordsman
 
Join Date: Apr 2011
Location: Göteborg, Sweden
Posts: 348
jens is on a distinguished road
When you say: 'you can map to keys like {^S}[F3]'

Does that mean I can have an action that reacts on holding down CTRL, then pressing and holding down S, then pressing F3?
jens is offline   Reply With Quote
Old June 1, 2011, 15:17   #4
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,876
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by jens View Post
When you say: 'you can map to keys like {^S}[F3]'

Does that mean I can have an action that reacts on holding down CTRL, then pressing and holding down S, then pressing F3?
No, it's holding down control+shift+F3. Anything in {} is a modifier (control/shift/meta/et.).
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old June 1, 2011, 15:28   #5
jens
Swordsman
 
Join Date: Apr 2011
Location: Göteborg, Sweden
Posts: 348
jens is on a distinguished road
Ah, now that I know that S stands for shift it makes more sence :-)
jens is offline   Reply With Quote
Old June 2, 2011, 09:01   #6
Timo Pietilä
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,093
Timo Pietilä is on a distinguished road
Quote:
Originally Posted by takkaria View Post
So there's no documentation yet, I'll get some sorted before 3.3 releases.

So for each character, you can have a modifier: {K} means keypad, {M} means meta, {^} means control, {S} means shift. Non-alphanumic keys are in [], like [Return] or [F4]. This means that you can map to keys like {^S}[F3]. If you have an alphabet key with no modifers except control, you can skip { and just write ^, like ^S. If you have copy of the source, you can see the names of keys between [] in ui-event.c.

Please tell me if you need more/less help, I'll be happy to provide it (but only after the weekend, though, I'm going away tomorrow).

EDIT: I had {C} meaning shift - it doesn't, {S} does.
Old way of doing that was to write that shift inside the action key IE: [shift-F1] That doesn't seem to work anymore so I need to tweak them to use {S} instead.

Is "meta" same as "alt"? Or alt gr? Or both?
Timo Pietilä is offline   Reply With Quote
Old June 2, 2011, 09:24   #7
Timo Pietilä
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,093
Timo Pietilä is on a distinguished road
Quote:
Originally Posted by Timo Pietilä View Post
Old way of doing that was to write that shift inside the action key IE: [shift-F1] That doesn't seem to work anymore so I need to tweak them to use {S} instead.

Is "meta" same as "alt"? Or alt gr? Or both?
Tested, alt seems to be {A} alt gr {^A}.

For some reason keymap sequence \e\e\e\e\ef0' works, but \e\e\e\e\ef0* asks which ammo to use? I also got the first one pop up equipment list when critter died using it. Trying to reproduce to see which situation that happens....seems to be totally random. Common thing is that it happens when the critter dies (shooting townsfolk to debug).

Same with using h to shoot nearest and *f0 sequence.

(random bugs)
Keypad 5 without numlock on doesn't seem to use turn.

For some reason overhead map centered dot is yellow while in main screen they are white.

I hope these get fixed. Otherwise 3.3 will be unplayable to me.
Timo Pietilä is offline   Reply With Quote
Old June 2, 2011, 09:48   #8
Timo Pietilä
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,093
Timo Pietilä is on a distinguished road
Quote:
Originally Posted by Timo Pietilä View Post
Tested, alt seems to be {A} alt gr {^A}.

For some reason keymap sequence \e\e\e\e\ef0' works, but \e\e\e\e\ef0* asks which ammo to use? I also got the first one pop up equipment list when critter died using it. Trying to reproduce to see which situation that happens....seems to be totally random. Common thing is that it happens when the critter dies (shooting townsfolk to debug).
Figured that out. \e as escape no longer works, I needed to use [Escape] in that.
Timo Pietilä is offline   Reply With Quote
Old June 2, 2011, 09:56   #9
Timo Pietilä
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,093
Timo Pietilä is on a distinguished road
Quote:
Originally Posted by Timo Pietilä View Post
Figured that out. \e as escape no longer works, I needed to use [Escape] in that.
Well, still need to rethink my ex-macros. Killing -more- prompts doesn't seem to work with [Escape].
Timo Pietilä is offline   Reply With Quote
Old June 2, 2011, 16:26   #10
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,609
Derakon is on a distinguished road
You can't use keymaps when the game has a -more- prompt up; they just won't engage. Keymaps are only valid when the game is waiting for your next action.

There's an option to automatically clear -more- prompts; maybe that would help?
Derakon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A minor keymap question Tobias Vanilla 0 May 26, 2011 00:56
Can't use \r in keymap in latest nightly Max Stats Development 4 March 1, 2011 18:22
Microsoft NMake documentation FAIL zaimoni Idle chatter 7 September 4, 2009 04:53
Zaiband: Sidebar documentation zaimoni Variants 8 March 4, 2008 07:40
[Un] Restuffing the documentation Bandobras Variants 39 March 2, 2008 07:02


All times are GMT +1. The time now is 23:39.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.