11 ms·
The curious case of disappearing Polish S
- guard-of-terra 12y agoI would theorize that second used slavic language is not Ukrainian but Serbo-Croatian, at risk of getting hated by everybody mentioned. It also has a rare property of coming with two alphabets - cyrillic and latin.
- perokreco 12y agoPoland has more than double the number of people than Serbia + Croatia + Bosnia + Montenegro.
- guard-of-terra 12y agoYou're certainly right, third then.
- dimitar 12y agoFourth. While Ukraine is a bilingual country, it still much bigger than former Yugoslavia. Most people there consider it their native language and a majority know it. So if you are strongly biased for a small number you'll get 30 million speakers, if you are biased for a big number it might be 50 million. And on top of that you must use the same criterion for the S-C language, not counting Slovenians, Albanians, Macedonians, etc who know the language but don't use it much anymore.
- abrowne 12y agoFWIW Wikipedia lists Polish at 40M, Ukrainian at 30M, and Serbo-Croatian at 19M, for native speakers: https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers https://en.wikipedia.org/wiki/List_of_languages_by_number_of...
- viraptor 12y ago> To find room for the extra letters, typewriters needed to dispense with some punctuation, most notably semicolons (comma + backspace + colon), and parentheses (replaced in common use by slashes). I've seen the slashes-as-parentheses on many (mostly older) documents before, but never knew why. Suddenly this makes so much sense. Unfortunately what makes less sense is official translators still using // for () these days.
- kosma 12y agoI initially planned to put a TL;DR here, but it's the best bug analysis I've seen in months - a pleasure to read! - so I'm leaving it for others to savour. The very same bug used to be present in early Windows mobile GPU drivers - with global hotkeys making it impossible to enter Ł (with Intel GMA 950) and Ć (with ATI Catalyst). Being a Polish geek, I used to earn lots of free dinners from frustrated friends who were forced to copy-paste those letters on their brand new laptops. Funny how the same bug recurs in different types of software due to an obscure locale-dependent edge case - and it's much less known than, for example, the Turkish dotted/dotless I.
- voltagex_ 12y agoDid the drivers (or tray apps) bind those keys? What for?
- M4v3R 12y agoTray apps were binding those keys to open settings panels or tweaking driver configuration on the fly.
- V-2 12y ago"The very same bug used to be present in early Windows mobile GPU drivers" Not just the early ones, no :)
- seppo0010 12y agoI think the article is too verbose when knowing the context the bug is trivial: you intercepted meta+s and ctrl+s and in the way you broke alt+s. I find the save dialog useless for web browsers as well, but I think preventing its use is a bad idea in general. Overriding the browser's shortcut is uncomfortable. For example, wordpress likes to capture cmd+<number> to change the font style, but that's how I usually change the active tab. It also disables ctrl+tab, the other way I use to escape while the text area is active. People use their browsers and have their workflow in them. Breaking them needs to have a really good excuse. http://xkcd.com/1172/ http://xkcd.com/1172/
- derekp7 12y agoBut the article explains why they override ctrl-s. It is because the users had muscle memory to keep hitting ctrl-s to save, since they were used to not having an auto-save function built in. But more than that, is the idea of a web browser as an app delivery platform. If a web browser is running an app (such as a word processor, or spreadsheet, or anything but browsing the web) it is sometimes necessary and beneficial to turn over browser-reserved keystrokes to the app in question. The only time to expect browser shortcut keys to work normally is when browsing a web page (vs. using the browser to run an application).
- qewrffewqwfqew 12y ago.. another relevant xkcd: https://xkcd.com/1479/ https://xkcd.com/1479/
- chinpokomon 12y agoPfft. Or you could just press Alt-Space, M, and then the arrow keys to "bind" the move to the mouse movement. This will let you bring the dialog back onscreen. On second thought, I'll be glad when I don't have to know that.
- duskwuff 12y agoIndeed, allowing the browser's default Ctrl+S action to take effect would be actively harmful. It'd trigger a behavior that's completely useless to the user (saving the active web page as HTML), but which could easily be mistaken for doing something useful.
- Spoom 12y agoWhat an interesting article. I don't think many people outside of our field realize how obscure some bugs can be, and the lengths needed to diagnose them. Not every bug, of course; not even 95% of bugs. But every now and again, you get something that really tries your problem solving skills... and inevitably it ends up being something small like not checking the state of every meta key.
- qewrffewqwfqew 12y agoYet another example of why websites shouldn't be able to hijack keys that have meaning outside them (in the browser itself, or in the desktop environment). It still blows my mind that browsers permit this and don't provide an easy option to stop such abusive (and dangerous!) behaviour. The workaround is typical of web stuff as well: deal with the symptoms one by one while leaving the underlying problem unquestioned.
- cuu508 12y agoEven without web stuff there are many apps, and there is one keyboard and there are going to be key binding conflicts. Webapps may need low(er) level access to keyboard for legit reasons too. Years ago I was working on webapp that teaches 10-finger typing. It needed to know 'pressed' states of keys like Shift and Alt. There were various browser differences to work around. Luckily the app didn't need to support Polish layout.
- qewrffewqwfqew 12y agoSo make it opt-in, and highly visible to the user when it happens. I get a nag screen when videos in the browser go full screen, telling me loud and clear that expected behaviour is changing and telling me how to get control back. When a website overrides keyboard controls, the first I know about it is when I can't scroll properly, or switch to another tab, or go back, or close the window that's yelling at me and making my machine thrash ... Disruptively changing modes without notification violates fundamental rules of interaction design, affordances and basic security. How is that okay?
- chinpokomon 12y agoI feel like that's an old way of thinking. If websites are too grow up and become first class applications, and advancements in Chrome and Firefox are paving that way, we want the browser to become a very thin runtime that doesn't impose any behaviors of its own. It should be mostly transparent to the user that they are in a browser. The fact that different browsers use different shortcuts makes that all the more important, that browser shortcuts need to be invoked in other ways that won't conflict.
- blahedo 12y agoI do not have sufficient profanity in my verbal arsenal for websites that override basic, fundamental browser behaviour because they think they know better than I do what I actually meant to do. I have noticed Medium being a regular perpetrator of this sort of broken behaviour before. That one of the developers at Medium could run into such a glowing example of one of the many reasons it's nasty to override browser behaviour, and take the lesson from it that oh hey, we just need to make our override logic more complicated... the blindness and idiocy and sheer bloodymindedness of this response I just can't even. Medium: YOU'RE DOING IT WRONG.
- omaranto 12y agoIf you ask me web browser's stole CTRL+S! It used to mean "save my work", but in a browser it means "download a copy of the website I am viewing", which seems totally different to me. I can't remember ever wanting that behavior. I agree with you that websites shouldn't override useful browser behavior, but I'm OK with websites restoring CTRL+S to it's rightful meaning of saving my work.
- neohaven 12y agoIt means "Save the thing I'm looking at". Ctrl-S says to your browser "I want to save this".
- Shog9 12y agoExcept, it generally doesn't mean that either. It means "download the page again and save that - nevermind if what I'm looking at has changed since it was retrieved". Which also breaks the mental model of "save my work", even if you're just typing text into a form.
- cwyers 12y agoIt's a holdover from when people who made web browsers imagined them being used for browsing web pages, not as an application run time.
- na85 12y ago
- nathell 12y ago> Our extra characters might look very much like Latin equivalents, and amount to only about 8% of letter distribution (you will hate them playing Scrabble) Polish competitive Scrabble player here. It's not so much hate as a love-hate relationship. While it can be frustrating to be left with a vowelless rack containing a Ź in the endgame, for the most part these letters are quite desirable. Indeed, three of them (Ą, Ę, Ó) are vowels worth 5 points each, and only two of them (Ć and Ź) don't appear in any two-letter word. Even the Ź is fairly easy to get rid of, given an open enough (read: not completely blocked) board. They're nowhere near as irritating as the Q (and to a lesser extent Z) in English Scrabble.
- DogeDogeDoge 12y agoWe Polish people have a hard language :(
- jccalhoun 12y agoI've been friends with a couple from Poland for over a decade and I still can't say their names the "real" way.
- mootothemax 12y agoI've been friends with a couple from Poland for over a decade and I still can't say their names the "real" way. Honestly, Polish pronunciation isn't that tricky, trilled Rs aside. What're their names? Wikipedia has a great guide: http://en.wikibooks.org/wiki/Polish/Polish_pronunciation http://en.wikibooks.org/wiki/Polish/Polish_pronunciation
- mootothemax 12y agoWe Polish people have a hard language It goes both ways; for example, how many Poles have well and truly mastered all of English's tenses? Heck, personally I think getting the definite and indefinite articles right consistently is a hard enough struggle.
- V-2 12y ago"While France, Germany, and other countries got their early PC with customized keyboards whose layouts mirrored closely the typewriters that came before… [...] …in Poland, we had to find another way of inputting the extra 9 diacritics unique to our language." Did we? I dare to say that your historical account is inaccurate. We stuck to our traditional layout for a while. What does it matter if the keyboard wasn't customized in physical sense anyway? You should be looking at the screen, not at the keys. If I recall well, Polish typewriter layout (PN-87) was still available on Windows 95/98. The now prevalent >Alt + something< one was called "programmer's layout", and the name itself indicates that it wasn't originally thought of as everyman's layout. Domestic software certainly used the typewriter layout - for instance http://pl.wikipedia.org/wiki/TAG_%28edytor_tekstu%29 http://pl.wikipedia.org/wiki/TAG_%28edytor_tekstu%29, once a very popular word processor for PC, last version released in 1996. The typewriter layout finally got extinct, but what spelled its ultimate demise was the internet, I believe. Early netiquette actually forbid using Polish diacritics, because of encoding issues - in that era you could never be sure whether the other person would read "gwóźdź" or "gw░¶d¶", so it was considered good practice to stick to Latin characters only. Meaning that users didn't get to feel the pain of having to press Alt + whatever all the time, and so they got hooked on default QWERTY. As the last of Mohicans, I use the typewriter layout to this very day (for typing in Polish; I alternate), only I had to recreate it myself (using Microsoft Keyboard Layout Editor)* It allows for much faster typing in compare to these inconvenient right-Alt shortcuts. Swapping Y with Z by itself is a win for a Polish speaker (writer), given that Z is much more common in Polish. While its frequency is at mere 0.07% in English, it reaches 4.9% in Polish, placing it in the top 10. Thus putting it under the weakest finger of all - your left pinky - isn't very considerate. ------- * Funnily enough - I'm not flame baiting - when I decided to try Linux, hailed for its customizability, I found out that recreating my favorite layout wasn't as easy. I got lots of advice on various forums, but noone had a simple receipt for me. Admittedly this was few years back.
- kosma 12y ago> If I recall well, Polish typewriter layout (PN-87) was still available on Windows 95/98. It's way worse: it's installed by default up to (at least) Windows 7, along with a silent (no feedback!) Left Alt-Shift shortcut that switches the keyboard layout. Press it unknowingly and BAM - suddenly your diacritics don't work anymore and Y/Z are swapped. Annoys the hell out of an Average User. PS. I'm not saying that the layout was bad - just that there shouldn't be a magic shortcut for a "break my keyboard now!" feature.
- Sami_Lehtinen 12y agoNoticed similar issues with official Australian VISA / immigration pages. You can't simply fill some forms with your email address using Finnish keyboard. Why? Because they block usage of AltGr button on their page. They also prevent using clipboard blocking copy paste option for that sign. User has to be smart enough to switch to US keyboard and then enter @ sign and then switch back. So this is nothing new, but it's absolutely rude from part of the site designers to vandalize basic functionality like that. Normally @ is produced by AltGr + 2. I guess they got BOFH department, let's make this really annoying and prevent people from getting their business done, laugh.
- dredmorbius 12y agoOr, as I found on a BBC news page earlier today (and reported via feedback), my middle mouse button on link to open in new tab wasn't -- the page was opening in the present tab. Don't break user controls. Seriously. Fucking. Annoying. The tendency of sites to also force all links to open in a new tab is similarly annoying. I've got the means to choose. Leave it to me. Another argument for disabling JS pretty much everywhere.
- qball12 12y agoyeees.... now-a-days very often without JS you pretty much get an empty HTML. I mean empty as in - <body></body> empty.
- mootothemax 12y agovery often without JS you pretty much get an empty HTML The annoying thing is: if there were a header the browser could send to the server - "JS is turned off" - it'd be trivial to serve a pre-rendered full HTML response. It's what plenty of e.g. Angular sites do to support the various search engines. Adding one more item to the list of "serve a prenderefndered view if X is true" checks wouldn't do any harm.
- w__m 12y agostill, how about choosing font that does support latin-ext characters properly for medium.com/polish ? just saying.
- ojanik 12y agoThis is how you type euro sign € on a lot of keyboard layouts, no communism needed. Looking at your code, you're also blocking Win+S on Windows and Ctrl+S on Mac for no good reason. Extrapolating from your experience: What about shift key? When you decide to block default behaviour, do your research, not everyone is on a Mac with American layout.
- odiroot 12y agoOh nice, an article about my native language on HN's front page. Currently living in Germany I actually find our approach to special characters really elegant. I was surprised how much different are German (and French) keyboards. I wonder whether these different layouts can affect for example your programming prowess.
- kosma 12y agoIt definitely affects the learning curve. Have a look at the Czech keyboard layout; when I first started learning that language I ended up using the Compose key. Why on Earth would you put diacritics on numerical keys without any kind of logical mapping? At least Polish is 100% logical in this regard (except AltGr-X, but that was unavoidable). The Russian keyboard layout is similarly annoying as the keys are simply not where you expect them. On most systems you can install a phonetic keyboard driver and kinda roll with it - that is, until you have to use a real Russian keyboard, at which point you have to re-learn from scratch. Oh, and don't get me started on AZERTY and QWERTZ. What were they thinking?! The point is that on some layouts you can start typing right away; on other, you have to jump through hoops and get frustrated. Not that we can do anything about it now. Historical reasons.
- expertentipp 12y agoI find the polish programmer layout very intuitive. National layouts for languages using latin alphabet are often failed customizations of design already not optimal and nightmare for foreigner. Italian - need tilde character? sorry. German - dedicated key for each umlaut and brackets cluttered under 7 - 0. French - AZERTY? really?
- CalRobert 12y agoReading this reminded me of how incredibly annoying it is that new OS'es don't always underline the shortcut key. It's maddening! I can't seem to get it to work in Unity; auto-mnemonic true or false makes no difference.
- frik 12y agoGerman keyboard has the AltGr key too, it like pressing Ctrl + Alt, though there is no special character mapped on the "s" key.
- hawat 12y ago1) There is something called "polish typewriter keyboard", now is more like a unicorn than computer part but... I really had one in 1995. 2) in `80 Poland produce some computers "on it`s own", like elwro: http://upload.wikimedia.org/wikipedia/commons/6/65/Elwro_800_Junior_jednostka_centralna.jpg http://upload.wikimedia.org/wikipedia/commons/6/65/Elwro_800... And they had polish typewriter keyboard... 3) And, there was a polish made clone of IBM PC: http://pl.wikipedia.org/wiki/Mazovia_%28komputer%29#mediaviewer/File:Mazovia_1016_PC.jpg http://pl.wikipedia.org/wiki/Mazovia_%28komputer%29#mediavie... and, yes - it has a polish typewriter keyboard...
- haddr 12y agoWith one exception: "polish typewriter keyboard" is QWERTZ.
- moron4hire 12y agoI first learned about this issue while working on Primrose. Things get really hairy in the browser when you start talking about JavaScript, the keyboard, and international support. For example, there is no way to know what keyboard layout a user is using. With Primrose, I guess based on the user's default language, but even that isn't perfect as a lot of not-US English speakers just show up as "en", with no further locale description, so I also provide a select list with all of the available choices. It's very difficult to know with certainty what character a user is intending to type. KeyCode 51 with no modifier keys is "3" on most keyboards, except French, where it is "#" (they essentially swap the casing of the number row). The number pad numbers send different keycodes than the number row numbers, but the number pad arrows (if you turn off the numlock) send the same keycodes as the arrow keys. In languages with deadkey support for diacritics (such as French and German), the deadkey keyCode isn't sent until the second key is typed. Then, they are sent in rapid succession. There is absolutely no way to know what is going on with IMEs. And there is no reliable way to interact with the soft keyboard on mobile devices. Some versions of soft keyboards don't send the arrow key keyCodes. There is no standardization of what keys should be available, so you can't guarantee that your user will easily be able to type your shortcuts (I know of only one keyboard on Android that even has CTRL or ALT). And it's nearly impossible to know how much space the soft keyboard is going to take up on the screen (you can figure it out on Android, eventually. It's impossible on iOS.). So, you have one of two choices, if you're trying to implement any sort of browser-based application that involves heavy use of the keyboard. Option 1: You can either create a hidden, surrogate text area in which the user actually types, unbeknownst to them, and run a sync process between the content they type and the content you display. This has several problems: you have to wait for keyUp to activate shortcut commands. The sync process can be costly (especially in the context for which Primrose exists: WebVR) and it is difficult to keep the cursor view in sync when dealing with mouse/touch interactions. Oh, speaking of pointer actions, you have to make sure your surrogate text area is positioned exactly under the displayed text field, with the text appearing the same apparent size as the displayed text, because when it gains focus the browser will scroll the view to it. But it will work, except for certain use cases. It won't work well on mobile, and it won't play nicely with WebVR (which is the entire point of Primrose, anyway), especially for Asian users using an IME. So Option 1 isn't a good option. Option 2: completely reimplement the key input stack, i.e. create all the keyboards and soft keyboards and IMEs your users will ever need. Completely ignore what the OS and the browser tell you, take only the raw keyCodes, and reconstruct what is happening. It's a lot of work, a lot to debug, but at least there is a path to actually solve every problem.
- zokier 12y agoWhile most commentary is (fairly) focused on browser behavior and keyboard hijacking, I'd point out another viewpoint: why the frak does every latin alphabet using nation need its own keyboard layout? Couple of diacritics is hardly a good reason to reshuffle the whole keyboard.
- mikeash 12y agoI'm sure they don't, but it's hard to overcome tradition. I imagine there was no real reason to share layouts across countries in the 1800s when a lot of this stuff was hashed out.
- mzs 12y agoIn Polish cz, rz, dz, and sz are very common, like sh and ch in English. Look at your US style keyboard and notice when typing ch and sh it is a L followed by R hand press. Now look what happens when you want to enter the common Polish cz, dz, sz, or rz. They are both L hand. So that's why Y and Z are better swapped for Polish language. L and Ł are better to be two separate keys because often there is only one modifier key for the letters with tails and it is on the right near the L key.
- jdmichal 12y agoBecause typewriters, and therefore keyboard layouts, predate computers. There's no technical reason to not just have composable meta-keys, excepting maybe the pure number of existent diacritics [0]. In fact, on the German keyboard, the circumflex (ˆ), acute accent (´), and grave accent (`) keys all compose with the next entered character. (That is, á is entered by pressing ´, then pressing a.) Windows also offers an "international" keyboard mode which allows composition in a way similar to the German keyboard. [1] [0] http://en.wikipedia.org/wiki/Diacritic http://en.wikipedia.org/wiki/Diacritic [1] http://support.microsoft.com/kb/306560 http://support.microsoft.com/kb/306560
- zokier 12y ago> Because typewriters, and therefore keyboard layouts, predate computers Even early US computers (and typewriters before them) had relatively varied keyboard layouts, but somehow[1] they still managed to converge into the standard 104 key layout that we have today in the early 90s (and that is a quarter of century ago). What we have missed is the extension of that convergence into international community. > There's no technical reason to not just have composable meta-keys, excepting maybe the pure number of existent diacritics [0]. > In fact, on the German keyboard, the circumflex (ˆ), acute accent (´), and grave accent (`) keys all compose with the next entered character. (That is, á is entered by pressing ´, then pressing a.) Dead keys are fairly good solution. Indeed I counted 19 dead-key diacritics on my countrys official standard keyboard (which almost nobody uses). [1] IBM PC/Wintel monopoly probably helped
- rvennar 12y agoOk, but Polish is a dying language, so I don't think it matters that much.
- cysun 12y agoI use regularly English, German and Romanian. I find it easier to learn using the two extra standard layouts (not the programmer version) and change between them by ALT-SHIFT than pressing ALT-X for every diacritic. The WPM count falls drastically using the ALT key all the time.
- jarek 12y agoThis is true for English and German but in the Polish layout the characters are only accessible with right Alt
- 59nadir 12y agoThe much bigger problem is that browsers out there are crap and won't let you re-map your keys as you want them. How is it that we're well into the 2010's and I still can't get (my own) emacs keybindings in Firefox/Chrome without some silly extension that doesn't work 100%? I can download uzbl, dwb or any other browser like it and edit my keys as I see fit, for emacs/vim keybinding behavior, without limits. I don't know about Medium, but I also find that most websites have these hidden shortcuts and you can't even re-map those. Why is there no choice in all this? Browser developers and websites can spend hundreds of thousands of dollars on UX/UI research, but can't figure out that I might want to re-map some keybindings.