5 ms·
Don't be so quick to dismiss something you don't understand as outdated and in need of replacement. If keyboards would send characters instead of scancodes you
by avian 8y ago
Don't be so quick to dismiss something you don't understand as outdated and in need of replacement.
If keyboards would send characters instead of scancodes you would lose the ability to switch keyboard layouts in software (or it would be an ugly hack, which it was before we started to use scancodes). Many people use their computers with multiple languages and find switching keyboard layouts on-the-fly very useful.
- spongeb00b 8y agoThe Apple Lisa was kind of half way in this direction. The Lisa ROM contained the matrix layout for each keyboard language, but it was the keyboard itself that would return both the scancode and the fixed language of the keyboard being used. And IIRC plugging in a keyboard of a different language would automatically change the system software the use that language.
- nerdponx 8y agoYou're absolutely right. I personally think we should have both systems: The current "position dependent" system we have now, and a system for sending Unicode.
- rwmj 8y agoWhile there might be a handful of people who switch keyboard layouts, I imagine that different keyboard layouts causes far more problems, lost time, and engineering effort. Overall it would still be better if keyboards sent Unicode characters.
- yiyus 8y agoYou say you imagine different layouts cause problems and sending Unicode characters would be better, but you did not give a single reason. I regularly use different keyboard layouts and it has never been a problem. It does not suppose any lost of time or engineering effort. When you have to usually communicate in different languages (which is common for the most part of the world), it is very useful. I have also built several keyboards, and I cannot imagine the pain it would be having to define a key for every Unicode character.
- rwmj 8y agoI gave several reasons: Every time I install a new computer I have to select the keyboard layout, or the layout is wrong and I cannot type properly. Think of all the user and engineering effort wasted to support this corner case of switching keyboard layouts (so the keycaps don't even match the keys sent), used by a tiny number of users. I personally know of how much work went into getting QEMU to support keyboard layouts. It has to convert characters back to scancodes so the guest OS can convert the same scancodes back to characters. It was a nightmare to get it right. Such a lot of effort for such a silly feature. > I have also built several keyboards, and I cannot imagine the pain it would be having to define a key for every Unicode character. What? There's no reason you would define a key for every Unicode character.
- yiyus 8y agoMany users do not even know that keyboard layouts can be changed. I think you are hugely overestimating the effort spent in this. I understand this could be tricky for QEMU, but emulators are always tricky. They are exceptional, not the norm. And what I don't understand, is how it would work in your ideal world. Let's assume we do not allow users to change keyboard layouts. How do I input characters for different languages? Am I supposed to have a different keyboard for every language or do I need a keyboard than can change layouts? Would those keyboards be included in laptops? How is this simpler than keyboard layouts in the OS? I do not say you would have to define a key for every Unicode character, but if the OS is expecting Unicode, either you have to define some way to send it from the keyboard, or you implement in the OS some mapping, but at that point you would just be using Unicode characters as scancodes and we would be back at square one.
- nerdponx 8y agoI have also built several keyboards, and I cannot imagine the pain it would be having to define a key for every Unicode character. What, like a QMK-style C macro for every Unicode code point? that's not the only way to design the API.
- vvillena 8y agoI assume you don't work or live in a multilingual environment, do you? That's the kind of shortcut that brings huge problems to people all around the world. Of course it means more engineering effort. That's why we're here for.
- rwmj 8y agoI routinely type English and Japanese on my one keyboard. We're not talking about whether keyboards should have different configurations in different parts of the world, just whether any particular keyboard should be able to be remapped so that it sends keys which no longer correspond to what's written on the keycaps. I contend that almost no one does that (obviously outside the 2 people on this page who are so insistent on the feature), so the engineering effort is not worthwhile. And it must be weighed against all the times everyone has to select the right keyboard layout manually when installing operating systems, or they type a particular key but what shows up on the screen is different from the keycap and they have no idea how to fix it.
- avian 8y agoMy experience comes from continental Europe. Most people I know here switch at least between their local national keyboard layout and the US layout. US layout lacks the characters necessary to write in the local language. European layouts often make it awkward to access punctuation common in English (e.g. you need Alt-Gr combos to access). Many people need to use both English and their local language (and perhaps a third European language!) in day-to-day business, hence the need for switching between layouts.
- vvillena 8y agoI understand your opinion, and surely you have way more experience than me on this matter. Still, it seems that there should be a better way. Why aren't keyboards able to communicate a default layout? I've been reading about the current one and it's true it's complex and full of legacy decisions, so why isn't there a "better scancodes" protocol? It's true, using a keyboard layout different from the one printed on the keyboard is unheard of in much parts of the world, but on others it's almost a necessity. Continuously installing operating systems and manually configuring keyboard layouts is uncommon, too, and it's mostly solved by automatic layout recognition, aka "write the words you see".