Keyboard
Pages: 1 2
Rick Murray (539) 13840 posts |
How does this actually work? Note: That’s not to say you can’t detect Shift. A low level keyboard scan and/or negative INKEY will show it. But normal INKEY, GET, OS_ReadC, and KeyPressed poll events won’t show it at all. Instead, it changes the behaviour of other keys (like ‘6’ → ‘^’). So… how can you have a modifier that is, itself, a key? |
Steve Pampling (1551) 8170 posts |
In RO? I can’t see that it does. DeepKeys might enable that but then we’re 20,000 leagues1 from normal RO.
An interesting question, but that would need to be answered by the people that did that bit of coding. 1 Oh, the fun you can have someone isn’t listening :) |
Clive Semmens (2335) 3276 posts |
I don’t know about recent RO, but back in the days of the late lamented IKHG, there were also alt, alt-shift, alt-ctrl, and alt-ctrl-shift. |
Steve Pampling (1551) 8170 posts |
Yes, keyboard support is lacking.1 Wasn’t Nemo working on that and fonts etc?2 On the “what’s available” front, it might be nice to have the base OS presented with the values assigned to a large pattern of values from the combinations of all the valid “normal” keys plus the all combined modifier variants. 1 Rick’s references using words like “weird” and “convoluted” are the polite end of comments 2 That’s what he seemed to be doing3 before the final insult initiated his departure from these environs. 3 As well as anything else that took his fancy from moment to moment. |
Rick Murray (539) 13840 posts |
You don’t tell me. MoreKeys (for those who don’t know) is a GUI add-on that traps certain keypresses and uses them to pop up a window with a selection of characters in it (like all those accented ones). Choose a character, and it’ll get sent as if typed at the keyboard. nemo, of course, freaked out and told me that what I should have done is written a Key Handler. Yup. An entire keyboard handler…in assembler…interacting with the weird and convoluted ;) and often bloody assinine low level keyboard system… just to pop open a list of possible characters to choose from. He then takes it further by asking if it will work outside of the desktop. Uh… no, no more than !Chars works from the command line. Furthermore, if the idea of a user level program swallowing keypresses is an anathema to him, imagine how I feel about the idea of a low level keyboard handler trying to do UI behaviours. Or maybe he missed this part of the description? ;-) There are actually numerous things that intercept and perform behaviours with the keyboard. MoreKeys, for example, you press both Alt and Ctrl (not a standard RISC OS modifier option) and then the key you’re interested in, like ‘e’. In none of these cases is “writing a keyboard handler” a sane response. These tools are augmenting existing functionality to add extra features. Maybe it would be easier and less liable to upset things/people/deities if the keyboard handling wasn’t basically a tarted up version of the BBC MOS keyboard handler. Aside: If you wonder about the seemingly eccentric internal key numbers, you’ll love this: https://heyrick.eu/blog/index.php?diary=20200413
But the problem is that you might not be able to do much with Alt because of InternationalKeyboard and all its Alt key behaviours, which are both immediate (Alt-a = æ) and stateful (Alt=; then u = ü). |
Steve Pampling (1551) 8170 posts |
That’s where we have to say that what we have at present is “keyboard handling [that’s] basically a tarted up version of the BBC MOS keyboard handler” that stumbled through a 38-year time portal. The “Alt key behaviours” seem to so obscure/mystic they rarely get mentioned and probably don’t get any major use as a result. |
Rick Murray (539) 13840 posts |
Yeah, such modern horrors as a Page Up key. It’s not just reading in keypresses, this bull is also replicated within the Wimp (PageUp = Shift-CursorUp, ditto PageDown) in the KeyPressed poll event. And it looks like we can tell the two Windows logo keys apart, but we can’t tell ‘*’ (Shift-8) from ‘*’ (numeric keypad). <sigh> It’s not just 38 years of thumb twiddling, it’s a fundamentally deficient design created in the beginning that nobody has bared touch in the 34 years since then.
That’s perhaps because English people rarely need to bother writing stuff with wibbly characters, unless they’re into härdcörë mëtäl perhaps. Don’t feel too bad though, Android in a UK layout with a Bluetooth keyboard pretty much cannot do anything beyond é; it’s simply unforgivable. Windows 98SE had this sorted, as did RISC OS, decades ago. WTF Gööglé? |
Steve Pampling (1551) 8170 posts |
…actually expect the four values four l-logo to be distinct from the four for r-logo Left Windows1 &1C0 &1D0 &1E0 &1F0 1 Note that some keys generate the same code, for example ‘Right Windows’ and shift + ‘Left Windows’ both generate Wimp key code &1D0. Unfortunately this is unavoidable due to the lack of spare key codes2. It is therefore proposed that the use of Ctrl with the ‘Left Windows’, ‘Right Windows’ & ‘Menu’ keys be used for extra functions, but that Shift + ‘Left Windows’ and Shift + ‘Right Windows’ be avoided. Shift with the ’Menu may still be used however. 2 Use 9 bits of 32. What’s that limit? |
Rick Murray (539) 13840 posts |
Wait… What? 🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦
It’s a word, the PRM said it’s a word back in the early ‘90s, what’s the problem?
That’s an eight bit value with somebody realising that there are a bunch of keys that aren’t regular characters but also generate key codes. Of course, these days, it’s a decision that means we simply cannot pass Unicode characters around the system. Instead it’s a horrible mess of multiple key press events in order to send UTF-8 codes. The Wimp, you’d have hoped, would have been abstracted enough from the underlying OS that it can offer ways around the deficiencies. But, no, the Wimp believes in minimalism. So in 2020, just as in 1987, we have to prod an OS_Byte to see if Shift is being held to tell one day from another……. |
Clive Semmens (2335) 3276 posts |
Personally, I wish they didn’t have them. I like a reasonable number of modifier keys, plus QWERTY, a numeric keypad, tab, return, delete & cursor keys – you can keep all the rest. They’re just there to stop me touch typing so easily, and would all be better on some-modifier-QWERTY. Then I could touch type them too. But yes, a 9-bit limit for keycodes is bloody silly. |
Chris Mahoney (1684) 2165 posts |
You don’t like the Sun Type 7 then? :P The Apple one I’m using now has a scant(?) 109 keys. |
Clive Semmens (2335) 3276 posts |
No, I don’t. But it’s not the worst I’ve had… http://clive.semmens.org.uk/024_ROUGOL/PP.html (now in the possession of the esteemed and sorely-missed Nemo). The Apple one I’m using at the moment has 78 keys. It’s not a laptop, either. I’d repurpose some of the keys if it was possible and I knew how and could be bothered, but there are enough keys if they were repurposed sensibly, and it’s 100% touch typable. |
Steve Pampling (1551) 8170 posts |
If you ignore the strange (US) placement of things like @ and " then it’s not greatly different to a large number of desktop keyboards I’ve seen. Mostly the stuff down the left, vaguely reminiscent of some old DEC terminals connected to kit I recall puling fluff from.1 Top row next to “Help” – is that the management ideas key? 1 Fluff. There was a bit of interlink kit in the back of reception that kept failing on hot days. |
Clive Semmens (2335) 3276 posts |
Indeed. And I don’t like them. This is the one I use on the Mac, and it’s excellent – but as I say, it would be better if I could reprogram it (easily) to provide my preferred functionality. |
David J. Ruck (33) 1635 posts |
At least the Sun Type 7 has a separate block of keys on the left. Some f**kwit decided to put another column of special keys immediately to the left of the keyboard on a HP laptop, so every time your muscle memory tales you to Ctrl, Shift, CAPS Lock or Tab, you end up bringing up the calculator, media player or some other unwanted action. |
Pages: 1 2