Extension Requests and General Discussion

Basic Help Menu by Emily Short triggers a bug in Parchment which makes help unusable on mobiles. The bug is over a year old and has no prospect of being fixed. Authors are working around this by deleting help from games. An update to Basic Help Menu which doesn’t trigger the bug would be appreciated.

This is unfortunately difficult to work around without breaking menus entirely, and affects many things apart from menus: anything that listens for keypress input triggers it. The best option would probably be to fix Parchment to wait for a full line of input if keypresses aren’t supported.

I agree with Draconis in general, that fixing one extension but not the keypress bug would leave the bug to cause problems elsewhere.

The current design of Basic Help Menu to use keyboard navigation for reading help documents isn’t suitable for devices without a keyboard. Even if there was no keypress bug, a touchscreen typically allows keyboard input by drawing a keyboard image on the screen; you can touch the image of a key to accomplish a key press. However, the image of the keyboard must be large enough that you can reliably touch a single key and it must be displayed whenever a keypress is needed - all the time with keyboard navigation; on a small device like a mobile phone, the keyboard image covers all or most of the screen obscuring the document and making reading inconvenient or impossible.

I put a new comment on the bug report - as I tested on Google Chrome on Android - and in my personal testing - it works fine if you use a hard keyboard (USB, Bluetooth, etc). It looks to me that the problem is that there is no focus area for the soft keyboard - there is another open bug with similar issues. There is no text box to type into - so the soft keyboard is throwing keystrokes into useless parts of the web browser. I suggested a transparent input field or other change. There might even be alternate soft keyboard apps that know how to work around such designs.

Even if you’re typing into a text box, Chrome will not send keypress events. Work arounds are probably possible using keydown or other events. Pull requests are very welcome!

Using another keyboard may help, but is not a solution to the problems in Parchment and Quixe, which are in fact using a depreciated function (keypress events).

But, my point stands, without any change to the code at all - a hard keyboard works. So Chrome must be sending it… The issue isn’t purely just Chrome → Javascript API, or a hard keyboard wouldn’t work on Android. This sort of problem shows up in non-Chrome apps on Android - there is an open bug on Text Fiction (which doesn’t use Javascript at all). Were is the focus? Where are the keystrokes going? The soft keyboard on mobile is tricky because it tries to go away - which on a normal desktop PC isn’t normal behavior (imagine a user constantly unplugging their USB keyboard). If focus doesn’t account for this - it can turn into problems. I’ve seen Parchment and Quixe have problems just by minimizing and alt-tab on a desktop - it can start throwing errors about input focus and confusion of which Glk window.

Right, soft keyboards won’t send all the events a hard keyboard (or alternative keyboard app) would, and the Chrome team, unlike the Firefox for Android and possibly Safari teams, have decided not to send mock keypress events.

Requiring another keyboard is not an acceptable solution for Parchment. But using keydown or input events should make it possible to send most keypresses to the VM, except perhaps for backspace.

I’m not suggesting requiring another keyboard as a solution (at best, it is a “workaround” - that should be shared openly with others); In fact, my suggestion was to experiment with creating a transparent (or semi-transparent) textarea input field when there is otherwise no place to touch the focus and wire that input field (JavaScript) into the interpreter. My point of bringing up the hard keyboard is that it points out that the JavaScript API being absent isn’t as obvious to me as it seems.

Those special keys are secondary topic to me. I’m not talking about special keys. The menu being cited in this topic allows normal keys like “P”, “Q” and “N” - and those were the ones I tested. And, people reported Firefox has the same problem as Chrome (qdacsvx commented on Mar 2, 2016), so I’m skeptical that it’s an issue of this one specific JavaScript API alone. It seems to be a classic case of no focus. There is no blinking cursor on the screen when this menu is up; where are the keystrokes going?

Regarding that secondary topic: I agree with you that there is a whole different mess with special keys on mobile. Especially things like cursor arrow keys or F1-F12 to navigate a menu - as most soft keyboards don’t present these. That’s not why I brought up a full 102-key hard keyboard (which has those keys), as I’m talking about routine keys like “N” and “Q” that the cited story offers in it’s menu system.

To the textbox which is hidden through absolute positioning -999em to the left.

I’m pretty sure the issue is Parchment’s reliance on keypress events. But I wrote that code 6 years ago and have hardly touched it since, and don’t remember all the hacks and intricacies it has. It would probably be better to start from scratch using the newer browser APIs. Or just fix it in GlkOte, because I’m already planning to switch to using GlkOte.

My concern is that this specific Chrome API is being blamed. But I’ve worked with Twisty 2.0, Text Fiction, Incant!, and Thunderword - and this problem comes up on mobile -with zero involvement of Google Chrome or Mozilla Firefox. Mobile is not trivial to get keystroke input right, it isn’t that Google is out to break things. In my own counting, Text Fiction is the most popular app for Android to play IF - and guess what - the author made a keyboard app for it! An entire app whose purpose is to help with the keyboard. My sense and experience is that it’s a complexity of mobile and Glk in general. Menus and ‘press key to continue’, in particular, are a real difficult area. It was just a few weeks ago that I added keystrokes to the mostly-complete Incant! app (which has Glk sound and a lot of other very complete features). The original author skipped keystroke input. Just 48 hours ago I had to rework Twisty 2.0’s keystroke input to allow you to exit the app! cite: github.com/WakeRealityDev/twist … 71d5888R86 – this took me over an hour just to track down where it was eating the exit button on the phone.

hi there, is the github repo: https://github.com/i7/extensions the right one to port extensions to newer versions and how do we mark them “working until inform7 version”? Or just tag with “doesnt work with current inform”?
So we can create issues per extension and then have the discussion per github issue?

Hello. I’m relatively new to Inform (I’ve barely been aware of it for 6 months), but I’ve been working on an extension for blindness for a while. One of my games relies on it for a while, and I decided to make it an extension so that others wouldn’t have to make all the rules themselves (and boy, was it annoying). I finally finished it and am ready to publish it. But that brings me to my question: How do you publish an extension? I’m not sure, as I’ve never done this before.

If there’s a thread or other resource that explains it, please redirect me, as I couldn’t find anything. I have visited the Inform 7 Extension Library and could not find anything about how to publish, even after I signed in. Please help!

1 Like

Right now the Inform 7 Extension Library page has fallen into disuse.

The best way to publish an extension is on a GitHub repository like https://github.com/i7/extensions. There’s a forum thread here, but just drop @Dannii a message and I think he can add you. As some people say in that thread, you don’t need to learn git to upload and update your own extensions, give and receive comments, etc.

3 Likes

I am using the following extension, Include Activity-based Simple Chat by Shadow Wolf in a project I am busy with.

Now suddenly there are a lot of errors in this extension with the result my project is not working.

Where can I find this extension as it seems it just vanished from the public library as well as all the friends lists.