Terminals Are Weird
31–40 of 48 posts
Re: Terminals Are Weird
#32This, like many things, is a case where many different problems get complected, because no one is able to step back and tweak every level of the stack to cleanly separate out the relevant models/abstractions. Ideally, a computer keyboard would be able to directly send both an arbitrary number of named control functions, and arbitrary unicode text (either as full strings or as code units one by one). Instead though, k…
Nobody is forced to use cryptic key combinations like the Emacs defaults. I use Emacs for about 30 years, and I figured out quickly how I can define my own keyboard mapping, even for function keys and other special keys. Emacs has always been more convenient to me than any other editor. The same counts for terminals. Keyboard macros or shell scripts are your friend if your desktop supports them.
If you know how to handle xmodmap then you can redefine even your whole keyboard which also affects every terminal. For instance I remapped the "/" key with xmodmap so that I don't have to use the shift key anymore, in any terminal. However I don't know if xmodmap is able to handle multiple key strokes. If not then this would be a nice to have feature for a coming release.
In my opinion terminals are still one of the most productive features of a computer. Usually we don't use multiple different terminals at the same time. Usually we have one favorite terminal, and that's why custom keyboard macros and mappings are (or should be) sufficient.
I think you actually don't want a smart keyboard. You want an intermediate layer that translates your special key mapping into control sequences of arbitrary terminals, don't you?
Re: Terminals Are Weird
#33This, like many things, is a case where many different problems get complected, because no one is able to step back and tweak every level of the stack to cleanly separate out the relevant models/abstractions. Ideally, a computer keyboard would be able to directly send both an arbitrary number of named control functions, and arbitrary unicode text (either as full strings or as code units one by one). Instead though, k…
Why do you want to put smart features into a keyboard if your PC is able to do that with around 0,0001% of cpu capacity? Smart keyboards would need special hardware and firmware updates, and this would make them more expensive. Nobody is forced to use cryptic key combinations like the Emacs defaults. I use Emacs for about 30 years, and I figured out quickly how I can define my own keyboard mapping, even for function…
I'm not sure about him. But for my part, I would love not having to fidget with X configuration, or Windows keyboard layout dialogues to track down which is the right layout whenever I plug a USB French AZERTY keyboard into my laptop with a Canadian multilingual QWERTY builtin keyboard.
And it would be the best if I could use both keyboards at the same time, because unless I mess around manually with input device selectors everytime I plug a new keyboard, my hardware has no way to know its layout.
And that's when I plug a French Mac AZERTY keyboard, and notice that some keys aren't at the same place and I once again need to find the appropriate layout.
Really, sending typed characters as UTF8 strings would be far preferable, and it wouldn't require processing power on the part of the keyboard (the keyboard would just send the strings, not parse them).
Re: Terminals Are Weird
#34Earlier quoted context omitted.
Why do you want to put smart features into a keyboard if your PC is able to do that with around 0,0001% of cpu capacity? Smart keyboards would need special hardware and firmware updates, and this would make them more expensive. Nobody is forced to use cryptic key combinations like the Emacs defaults. I use Emacs for about 30 years, and I figured out quickly how I can define my own keyboard mapping, even for function…
> I think you actually don't want a smart keyboard. You want an intermediate layer that translates your special key mapping into control sequences of arbitrary terminals, don't you? I'm not sure about him. But for my part, I would love not having to fidget with X configuration, or Windows keyboard layout dialogues to track down which is the right layout whenever I plug a USB French AZERTY keyboard into my laptop with…
This is not a keyboard problem but simply a driver problem. Usually USB devices transmit a USB ID to the PC so that the PC can handle them appropriately. So if we simply had a customizable layer between USB keyboards and the application layer then your problem would be solved. If the layer knows the USB ID of your keyboard then it could choose the correct driver automatically so that you wouldn't have to worry about your french keyboard.
Re: Terminals Are Weird
#35The summary of this well written page is: If you do still want or need to make a terminal application that is interactive rather than just being a command-line tool, what is the best way to go about it? You should write it inside Emacs, using Emacs Lisp...
Wasn't there a time when actual, serious apps were written using XULRunner ? This is not that different of a suggestion.
Not really. At least nothing to write home about.
But in general what you mean I guess is some kind of runtime environment. Sure there are lots, but not that many for the Terminal and Emacs is not really a lightweight and proper option.
Re: Terminals Are Weird
#36Earlier quoted context omitted.
> I think you actually don't want a smart keyboard. You want an intermediate layer that translates your special key mapping into control sequences of arbitrary terminals, don't you? I'm not sure about him. But for my part, I would love not having to fidget with X configuration, or Windows keyboard layout dialogues to track down which is the right layout whenever I plug a USB French AZERTY keyboard into my laptop with…
> Really, sending typed characters as UTF8 strings would be far preferable, and it wouldn't require processing power on the part of the keyboard (the keyboard would just send the strings, not parse them). This is not a keyboard problem but simply a driver problem. Usually USB devices transmit a USB ID to the PC so that the PC can handle them appropriately. So if we simply had a customizable layer between USB keyboard…
What's the problem with the keyboard knowing its own keys and just telling the symbol of the key that is pressed? Sure, it would still need some sort of escape sequence, or a way to mark whether a key's string is literal like Ù or symbolic like AltGr, but that doesn't sound too difficult.
It would also make it less difficult to add a new symbol like € to keyboards.
Re: Terminals Are Weird
#37Earlier quoted context omitted.
> In my ideal world, your app registers that it needs a “pick weapon #2” button, and a “walk backward” button. Then I can configure my keyboard firmware and/or the low levels of my operating system keyboard handling code to map whatever button I want to those semantic actions. Then the OS / Firmware is dealing with questions like, "What button fires the secondary dorsal thrusters". Does it make sense to handle that k…
"Likewise, a game is prepared to deal with buttons, not semantics. The number and layout of buttons is closely tied with design decisions. A FPS gives you WASD, plus QERF for common actions, ZXC for less common actions, 1234 for menus / weapon selections." Except on my keyboard layout an FPS should be giving me QSDZ, for the same pattern of movement keys, because I'm French and use AZERTY. Or AOE, because I use Dvora…
I was simplifying; I don't use QWERTY either. Most operating systems provide two ways to identify key presses, let's call them "key codes" and "char codes". So the char codes on a French layout are QDSZ instead of WASD but the key codes are the same, and the keys are in the same physical location so it doesn't matter. The only difficult part is figuring out how to present key codes back to the user.
Re: Terminals Are Weird
#38All the devices from pre 80s era are 'funny' because they conflate everything inside the implementation.
It’s not like we’re doing any better with the client-side web development stack (to take one example). Building simple composable abstractions and systems is just really hard, and takes a lot of practice and refinement. Unfortunately, programmers don’t necessarily get much practice before their designs become the foundation on which everyone else needs to work (for example, there is very little emphasis placed on des…
Re: Terminals Are Weird
#39Earlier quoted context omitted.
> Really, sending typed characters as UTF8 strings would be far preferable, and it wouldn't require processing power on the part of the keyboard (the keyboard would just send the strings, not parse them). This is not a keyboard problem but simply a driver problem. Usually USB devices transmit a USB ID to the PC so that the PC can handle them appropriately. So if we simply had a customizable layer between USB keyboard…
But why need such a layer when the keyboard could easily handle it itself? Each USB keyboard would need its own special driver to be installed on the system? Or would you have instead a large list of USB IDs and associated layouts? With some separate mechanism to allow custom layouts, or something. What's the problem with the keyboard knowing its own keys and just telling the symbol of the key that is pressed? Sure,…
Physical position, for which key codes are mostly† correct. Think ZQSD vs WASD.
† for interesting definitions of "mostly"