Keymap documentation?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Timo Pietilä
    Prophet
    • Apr 2007
    • 4096

    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?
  • takkaria
    Veteran
    • Apr 2007
    • 1951

    #2
    Originally posted by Timo Pietilä
    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.
    Last edited by takkaria; June 1, 2011, 14:16.
    takkaria whispers something about options. -more-

    Comment

    • jens
      Swordsman
      • Apr 2011
      • 348

      #3
      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?

      Comment

      • takkaria
        Veteran
        • Apr 2007
        • 1951

        #4
        Originally posted by jens
        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.).
        takkaria whispers something about options. -more-

        Comment

        • jens
          Swordsman
          • Apr 2011
          • 348

          #5
          Ah, now that I know that S stands for shift it makes more sence :-)

          Comment

          • Timo Pietilä
            Prophet
            • Apr 2007
            • 4096

            #6
            Originally posted by takkaria
            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?

            Comment

            • Timo Pietilä
              Prophet
              • Apr 2007
              • 4096

              #7
              Originally posted by Timo Pietilä
              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.

              Comment

              • Timo Pietilä
                Prophet
                • Apr 2007
                • 4096

                #8
                Originally posted by Timo Pietilä
                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.

                Comment

                • Timo Pietilä
                  Prophet
                  • Apr 2007
                  • 4096

                  #9
                  Originally posted by Timo Pietilä
                  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].

                  Comment

                  • Derakon
                    Prophet
                    • Dec 2009
                    • 9022

                    #10
                    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?

                    Comment

                    • Timo Pietilä
                      Prophet
                      • Apr 2007
                      • 4096

                      #11
                      Originally posted by Derakon
                      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?
                      I want more-prompts to see whats going on, just not when I'm in auto-fire-mode. I think that was the reason I used macros instead of keymaps in the first place. No need to wait until game is ready for a command.

                      Does it interrupt the command sequence after it has accepted the command? I mean if I do h[Escape][Escape][Escape][Escape][Escape][Escape] instead of [Escape][Escape][Escape][Escape][Escape]h ?

                      Comment

                      • Tobias
                        Adept
                        • Dec 2009
                        • 172

                        #12
                        auto more is only a good idea if you play with a log-subwindow.
                        And even if you activate it,
                        f0'[Escape] will not cancel the "target out of range" menu like f0'\e did in the old version.
                        My Angband videos : http://www.youtube.com/view_play_lis...385E85F31166B2

                        Comment

                        Working...
                        😀
                        😂
                        🥰
                        😘
                        🤢
                        😎
                        😞
                        😡
                        👍
                        👎