Angband on Cygwin64 (on Win10)

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • smbhax
    replied
    Originally posted by moosferatu
    No, there is no mouse support.
    I compiled the latest Angband source though Cygwin, ran with the Curses/ncurses front end, and had left mouse button / touchpad support: clicking the touchpad or the left mouse button moved my @ around the level--it freaked me out in fact, so I had to go and toggle the "mouse moves the player" game option off. : )
    Last edited by smbhax; December 14, 2021, 12:08.

    Leave a comment:


  • Grotug
    replied
    I discovered how to target using the 'o' key. This is actually preferable to using the mouse. So looks like I'm all set! Thanks again for all your patience and help Moosferatu.

    Leave a comment:


  • moosferatu
    replied
    No, there is no mouse support.

    Leave a comment:


  • Grotug
    replied
    I'm pretty happy with how things are now; shift-ctrl is easy to adapt to vs just using ctrl for alter actions.

    I think you may have mentioned earlier that there was a problem with the target action in Angband, but I only just noticed it now: I cannot target any square using the trackpad click. Angband is not recognizing that as a keypress at all. :-/ I tried to map the click of the trackpad but it didn't acknowledge any input. I can only target using *. Is there any workaround for this? I have an external mouse I could attach but it's at my house and I'm quarantining in another house right now.

    Leave a comment:


  • moosferatu
    replied
    Great!

    I did some reading about ncurses input this morning. I think it's possible to update Term_xtra_gcu_event() to behave a little more like how the other ports handle input. You just need to explicitly map all of the ncurses key codes to Angband key codes.

    The catch is that the key codes are dependent on the terminal emulator (for example, some return the same key code for <Right_Arrow> and <Shift><Right_Arrow>), but my understanding is that most modern terminal emulators behave similarly. You could keep the existing, odd behavior, for older terminals and use the new mappings for newer ones.

    A side effect of changing the GCU key code mappings to behave like the other ports is that it may break some players' custom mappings. For example:

    Input: <Shift><Right_Arrow>
    Current GCU passes to Angband: \xb5
    After fix: {S}[Right]

    Leave a comment:


  • Grotug
    replied
    Okay, I understand now. Thank you. That does work.

    Leave a comment:


  • moosferatu
    replied
    "Alter" is just generic name Angband calls doing an action on a space next to you. If you search the help file in game, that is what it calls it. It's the action that you're used to being mapped to <ctrl>+<direction> in the windows version.

    What I was trying to say earlier is that it doesn't appear to be possible to both map the run commands to <shift>+<direction> and the alter commands to <ctrl>+<direction> because of the key code overlap in the ncurses port. As a work around, I'm suggesting that you map the alter commands to <ctrl>+<shift>+<direction> instead.

    Leave a comment:


  • Grotug
    replied
    Do you use 'alter'as a general term for the 'run' or 'spin' actions?

    I don't understand how I'm supposed to map CTRL and SHIFT together when they each have separate functions for use with arrow keys. Sorry :-/

    IF I map CTRL with +n and SHIFT with .n how am I supposed to map CTRL+SHIFT?

    Leave a comment:


  • moosferatu
    replied
    Yes, that's what I was trying to say earlier, though I accidentally transposed right and left.

    You should be able to get the mappings to work if you map the alter actions to <ctrl>+<shift>+<direction> rather than just <ctrl>+<direction>. At least, I was able to get them to work on linux. I didn't try in cygwin.

    Leave a comment:


  • Grotug
    replied
    Oh man, this is really weird.

    There seems to be a conflict with CTRL DOWN and RUN RIGHT.

    So I removed all the run/spin keys.

    Then I mapped SHIFT (run) down, left, right, up by creating keys SHIFT <arrow direction> and putting .2, .4, .6, .8 for down, left, right, up

    So then run works as it should.

    But when I do the 'spin' keys CTRL <arrow direction> @ spins as he should except now when I try to run to the right, @ spins!

    I've figured out that it's the CTRL DOWN (+2) that causes the run to the right to no longer work. So there is some kind of conflict between CTRL DOWN and SHIFT RIGHT. Very strange.

    Leave a comment:


  • Grotug
    replied
    Ahh.. I see why it wasn't working. Needs to be <CTRL> not <ALT>

    Yay! @ spins around!

    Leave a comment:


  • moosferatu
    replied
    I meant your Grotug.prf file. That's weird it didn't work for you. I was just creating the mapping within Angband and then dumping it here for you. You could try creating the mapping manually in Angband on your side.

    The actions you need to map are:

    Alter left: +4
    Alter right: +6
    Alter up: +8
    Alter down: +2

    Leave a comment:


  • Grotug
    replied
    Do you mean the keys-gcu.prf file? I edited that file but there was no change in behavior. I then reverted that file and tried with Grotug.prf (my user pref file) and also no change in behavior. I then reverted that file and edited the pref.prf file but still no change. So I reverted that file as well.

    BTW I noticed that pressing <CTRL> <down arrow> causes @ to run East, but <CTRL><any other arrow key> nothing happens (ie. the game tells me to press '?' for help).

    I'm posting here what my .prf files look like in case I've totally botched one/all of them. The only part of pref.prf that I edited was the very end and I believe I've reverted it to the way it is meant to be.

    keys-gcu.prf
    =-=-=-=-=-=-=-=-=-=-=-=-=

    # Some hacky keymaps to allow shift-running with arrow keys in curses - now with numlock running

    keymap-act:.[Up]
    keymap-input:0:\xf6

    keymap-act:.[Down]
    keymap-input:0:\xf7

    keymap-act:.[Right]
    keymap-input:0:\xb5

    keymap-act:.[Left]
    keymap-input:0:\xbe

    keymap-act:.1
    keymap-input:0:\xc5

    keymap-act:.7
    keymap-input:0:\xc0

    keymap-act:.3
    keymap-input:0:\xf5

    keymap-act:.9
    keymap-input:0:\xf4

    keymap-act:.1
    keymap-input:0:\xdf

    keymap-act:.7
    keymap-input:0:\xc1

    keymap-act:.6
    keymap-input:0:[Right]

    keymap-act:.4
    keymap-input:0:[Left]

    keymap-act:.2
    keymap-input:0:[Down]

    keymap-act:.8
    keymap-input:0:[Up]

    =-=-=-=-=-=-=-=-=-=-=-=-=

    Grotug.prf
    =-=-=-=-=-=-=-=-=-=-=-=-=

    #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# begin Dump keymaps
    # *Warning!* The lines below are an automatic dump.
    # Don't edit them; changes will be deleted and replaced automatically.

    keymap-act:v[Right]0'
    keymap-input:0:/

    keymap-act:.2
    keymap-input:0:\xf7

    keymap-act:.8
    keymap-input:0:\xf6

    keymap-act:.6
    keymap-input:0:\xb5

    keymap-act:.4
    keymap-input:0:\xbe

    keymap-act:;4
    keymap-input:0:[Left]

    keymap-act:;6
    keymap-input:0:[Right]

    keymap-act:;8
    keymap-input:0:[Up]

    keymap-act:;2
    keymap-input:0:[Down]

    keymap-act:^P
    keymap-input:0

    # keymap-act:^P
    # keymap-input:0:\[

    keymap-act:w11
    keymap-input:0:1


    # *Warning!* The lines above are an automatic dump.
    # Don't edit them; changes will be deleted and replaced automatically.
    #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=# end Dump keymaps

    =-=-=-=-=-=-=-=-=-=-=-=-=

    # File: pref.prf
    =-=-=-=-=-=-=-=-=-=-=-=-=

    [snip]

    ##### System Specific Subfiles #####

    ?:[EQU $SYS gcu]
    %:keys-gcu.prf

    ?:1

    =-=-=-=-=-=-=-=-=-=-=-=-=-=
    Last edited by Grotug; March 27, 2020, 01:51.

    Leave a comment:


  • moosferatu
    replied
    Digging into it some more, there's some really weird stuff going on with the ncurses keymappings. For example, if you query the key map in game, it reports the following:

    [End] => \xdf
    [ctrl]+[shift]+[numpad 9] => [End]

    What?

    I suspect that it has something to do with whatever's going on here:



    Right now, I'm not sure if there's a bug in that code that needs fixed and then normal mappings will start working, or if that code is correct, but the ncurses version needs a bunch of additional mappings defined to have parity with the other ports.

    Leave a comment:


  • moosferatu
    replied
    Here's a solution for you. You can map <ctrl>+<shift>+<arrow> to alter direction actions by adding the following to your key map pref file:

    Code:
    keymap-act:+8
    keymap-input:0:[F8]
    
    keymap-act:+2
    keymap-input:0:\xb4
    
    keymap-act:+6
    keymap-input:0:[F14]
    
    keymap-act:+4
    keymap-input:0:\xa0
    You'll just want to avoid mapping anything to F8 or F14...

    Leave a comment:

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