Chaosforge Forum

  • August 10, 2020, 22:26
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Need Help With The Keybindings  (Read 2087 times)

Addahn

  • Private
  • *
  • Offline Offline
  • Posts: 2
  • Lost Soul
    • View Profile
Need Help With The Keybindings
« on: September 29, 2011, 00:40 »

Hello all,
I apologize in advance if this is the wrong forum section.
I'm playing the latest version of doomrl on a laptop and unfortunately It does not have the diagonal movement keys.
I tried to edit the keybindings file myself several times but every time i do the game won't start and I have to restore the original unmodified file.
Would anyone be able to make or instruct me on how to bind the movement to the num-pad? I.E. "8" would be walknorth "2" would be walk south, and so on.
Thanks for hearing me out and reading my post.
And heres to many more releases of my favorite roguelike.
-Addahn 
Logged

tehtmi

  • Programmer
  • Supporter of Chaos
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 451
    • View Profile
Re: Need Help With The Keybindings
« Reply #1 on: September 29, 2011, 01:09 »

The existing key-bindings are designed to work with the numpad on a standard full-sized keyboard in which the numpad keys are up, down, left, right, home, end, pg up, and pg dn when num lock is disabled. If you actually have a numpad on your laptop, make sure that num lock is off before trying to use the default bindings.

I know that some laptops also have num lock option that turns the right side of the keyboard into a psuedo-numpad. As far as I know, DoomRL's keybinding system can't distinguish between numbers typed by the row of keys above the letters and numbers typed by the numpad. So, if this is your situation, I would recommend simply leaving num lock off and binding the underlying keys to the various directions.

Regardless, if the game fails to start after changing the keybindings file, it is probably an issue of improper syntax; the game is sensitive to this and doesn't always provide good feedback. The syntax is designed for a programming language (the bindings are created by a Lua file), so a few things may be less intuitive when approaching it from a user's perspective. If you find yourself having to debug this kind of problem on your own, try changing the original file little by little and testing it frequently so that when it fails, you know your most recent change caused the failure.

To use numbers (or other keys that are used to type non-alphabetic glyphs), you need something that looks like this:
Code: [Select]
["1"] = COMMAND_WALKSE,
["2"] = COMMAND_WALKSOUTH,
["3"] = COMMAND_WALKSW,
["4"] = COMMAND_WALKEAST,
["6"] = COMMAND_WALKWEST,
["7"] = COMMAND_WALKNE,
["8"] = COMMAND_WALKNORTH,
["9"] = COMMAND_WALKNW,
These lines need to go in the keybindings.lua file after the line that says
Code: [Select]
Keybindings = {
and before the line at the end of the file that says
Code: [Select]
}
Keep in mind that when using these as given, the QuickKey bindings should be deleted from the file so that no conflict arises.
Logged

Addahn

  • Private
  • *
  • Offline Offline
  • Posts: 2
  • Lost Soul
    • View Profile
Re: Need Help With The Keybindings
« Reply #2 on: September 29, 2011, 06:49 »

Works Great!
Many thanks tehtmi.
Cant wait to try the new release.
Logged

Game Hunter

  • Programmer
  • Elder Chaos Guard
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1044
  • Looks like game to me.
    • View Profile
    • Channel, the Roguelike
Re: Need Help With The Keybindings
« Reply #3 on: September 29, 2011, 11:27 »

If you're ever wondering what a particular keybinding is for, check out this page on the Wiki. I'll try to add some tips regarding customized keybindings, although I wouldn't be surprised if you could have figured it out on your own just by reading this page.

Also, welcome to the forums!
Logged
I'm just a dude playing a dude disguised as another dude.

Latest LPs: Angband, Delver
Pages: [1]