jcsteh / osara

OSARA: Open Source Accessibility for the REAPER Application
GNU General Public License v2.0
127 stars 46 forks source link

Is there any mileage in OSARA distributing localized key maps along with translations? #507

Open ScottChesworth opened 3 years ago

ScottChesworth commented 3 years ago

Across the various support channels, it's quite a common occurrence that users in locations where keyboard layouts other than English QWERTY are the norm struggle with the OSARA keymap. This steepens the learning curve for newbies, because they have to take care of customizing assignments before they can start making stuff. On a purely technical level, what's the feasibility of OSARA bundling a localized keymap along with a translation where necessary? On a less technical level, does anyone have thoughts on how best to coordinate rolling out revisions to keymaps if such a thing were to be introduced? I can do some extra email pingpong, but that's about all I can contribute because I'm not familiar with any keyboard layout apart from UK and US QWERTY here.

Any thoughts appreciated.

MarcoZehe commented 3 years ago

As someone who recently contributed to this very choir of people affected, on the RWP list and on Twitter, I would totally be willing to help if I can. The first step would be to find out how Reaper maps keys. There seem to be some big differences between Mac and Windows, there are even two keymaps in the OSARA source.

As an example: The TimeSelectionStart and TimeSelectionEndPoint keys, left and right bracket on an U.S. English keyboard, map to the two keys to the right of the 0 key and the left of the Backspace key if the German keyboard layout is active. I don't know where this comes from, if Reaper does something fancy upon installation if they detect the German layout. But because the values are those from the OSARA keymap and seem to be identical to those in the default Reaper keymap file, I assume that Reaper somehow maps the values of these keys differently depending on keyboard layout.

Now, on the Mac, that same doesn't hold up at all. On the Mac with a German keyboard layout, things are really badly messed up. Like there is the minus key working to zoom out, but the plus key, which incidentally is the one two keys to the right of the letter p, does something entirely different, something about nudging time selection or envelope points, don't remember. And the TimeSelectionStart and TimeSelectionEnd functions are nowhere to be found at all. The actions dialog lists them as left bracket (hard-coded character) and right bracket (same), but since the German keyboard layout has these in totally different places, mapped to Option+5 and Option+6 respectively, unlike on Windows where these at least map to something remotely sensible, on the Mac the mapping fails completely.

BTW: Zoom in and out correctly maps to plus and minus on Windows just fine. But on the Mac, a lot of key bindings fall over if the keyboard layout is anything other than English.

Don't know if @GarthHum fell into this rabbit hole when he was working on the Mac keymap update, with the Australian layout (if that is different than U.S. and U.K.), or if you, @ScottChesworth , notice something off with the U.K. layout, but for non-English, especially on the Mac, there seem to be some really serious issues.

jcsteh commented 3 years ago

It's more complicated than translations because we can make a decision about what translation to use on REAPER startup based on what REAPER lang pack the user is using. In contrast, the key map has to be in place before REAPER starts. That means that decision has to be made by the installer. Which raises the question of how the installer makes that choice. Does the installer assume the user's current keyboard layout is the layout they'll always use? But for users who use multiple layouts, that is problematic. It's also more painful because this would have to be done with NSIS, and coding NSIS is like pulling teeth.

Personally, I also feel like I've already been burned with translations in the short time they've existed, so I'm a little reluctant to embark on another journey like this. But this is still valid, so I guess I'll watch and see what happens.

jcsteh commented 3 years ago

On Windows, I believe REAPER uses Windows vk codes for the key map. Those don't map super well on Mac. I believe there were some things that had to be manually mapped even for English on Mac for this reason.

ScottChesworth commented 3 years ago

I believe there were some things that had to be manually mapped even for English on Mac for this reason.

Ha, "some things" would be an improvement. Keeping the Mac map aligned is entirely manual at this point, with the majority of the work being done by @GarthHum. His suffering did get the keymap group to start taking documentation more seriously though.

ScottChesworth commented 3 years ago

Does the installer assume the user's current keyboard layout is the layout they'll always use? But for users who use multiple layouts, that is problematic.

Thinking about it, even if the installer were updated to offer the choice of multiple maps, I don't think there's a GUI-based way for people who use multiple layouts to switch map cleanly on the fly. Eek, messy.

Personally, I also feel like I've already been burned with translations in the short time they've existed, so I'm a little reluctant to embark on another journey like this.

Understandable. I'm a cynical SOB and even I wouldn't have predicted a turf war quite so soon. Maybe the best we can do is to collect up localized maps and offer those from the snapshots page? I guess I could start a group specifically for translators and localized keymap maintainers. Perhaps more communication as work is happening would help to prevent flare-ups around defending work that's already been done.

MarcoZehe commented 3 years ago

@ScottChesworth Feel free to ping me off-issue as well. I'd be interested to contribute.

jcsteh commented 3 years ago

Thinking about it, even if the installer were updated to offer the choice of multiple maps, I don't think there's a GUI-based way for people who use multiple layouts to switch map cleanly on the fly. Eek, messy.

I was more thinking users might use multiple system keyboard layouts (because they might be multilingual), but they'd probably only use a single layout within REAPER itself, so only a single REAPER key map would be required.

Maybe the best we can do is to collect up localized maps and offer those from the snapshots page?

I'm pretty reluctant to distribute stuff that isn't part of OSARA itself from the snapshots page, partly on principle and partly because it's ugly technically (the snapshots page is auto-generated). A wiki page might be a better way to go if we want to go the "unofficial" route.

jcsteh commented 3 years ago

I'm a cynical SOB and even I wouldn't have predicted a turf war quite so soon.

We have another Spanish translator requesting to join... and now I don't know what to do. I guess I have to tell them they can't and that their contribution isn't welcome because apparently our Spanish translators aren't capable of collaborating like adults.

MarcoZehe commented 3 years ago

First thing I would do for German is to document the current OSARA key map as it appears on a German keyboard Lay-out on Windows. Windows for me is definitely the authoritative instance here and probably just needs properly localized documentation. That is something for the Wiki.

I'd then start with an unmodified OSARA key map for MacOS and change it so that the same keys oon the Mac German layout perform the same functions, some specific changes between option, command etc not withstanding. That would then definitely result in an additional file people on MacOS would have to either download from somewhere and copy over, or the installer puts it in the keymaps folder along with the backup, and in any case, users would have to import and overwrite in Reaper.

Does an import in the Actions dialog normally do a merge, and is there a way to force an overwrite? Or is an overwrite only possible in Finder?

tbdalgaard commented 3 years ago

I followed this discussion since I ran into this myself when I started using Reaper a few years back.

I think the best way to go is to get users to install the extra US or UK keyboard, since that will save them a ton of time and frustrations along the road. The hardest thing is to get the keyboard installed on Windows/Mac OS, after this it is quite easy to change the layout. As a non native English speaker I must say that I really enjoy changing layouts from time to time depending on what I am doing on my computer. Therefor: This might be good for a wiki article or a short demonstration about installing and configuring an alternative keyboard layout. This is not new in fact. I remember over the years that non English speakers were used to install alternative keyboard layouts to get a program working.