[Ohrrpgce] [ohrrpgce/ohrrpgce] Space and Ctrl cause Enter to appear pressed, Alt causes ESC to appear pressed (#1106)

Ralph Versteegen notifications at github.com
Tue Mar 17 06:23:29 PDT 2020


Pressing Space or Ctrl results in `key is pressed(key:enter)` returning true if the "Map joystick controls to keyboard keys for scripts" general pref bit is on -- and it is by default in all games since -- and ditto for Alt and ESC.

This is caused by this block in `script_keyval` (added r10966 (daaad768)):
```
 IF prefbit(47) = NO THEN  '!Map joystick controls to keyboard keys for scripts
  SELECT CASE key
   CASE scUp:     ret OR= keyval(ccUp)
   CASE scDown:   ret OR= keyval(ccDown)
   CASE scLeft:   ret OR= keyval(ccLeft)
   CASE scRight:  ret OR= keyval(ccRight)
   CASE scEnter:  ret OR= keyval(ccUse)
   CASE scEsc:    ret OR= keyval(ccCancel)
  END SELECT
 END IF
```

Unfortunately this is a bit tricky to fix without breaking this prefbit because of the way `carray` is now computed. I think I need to refactor that code in allmodex to give each input device its own carray array, so that we can check just the joystick carray and map that to keyboard keys.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1106
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20200317/3bf7dca2/attachment.html>


More information about the Ohrrpgce mailing list