Alt and Amiga keys are swapped on USB kbd.

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
Deniil
Posts: 109
Joined: Mon Jul 11, 2011 6:59 pm

Alt and Amiga keys are swapped on USB kbd.

Post by Deniil »

I have never used a USB keyboard before, but now on the X1000 I have to of course.

Problem I have (on both of my two totally different USB keyboards) is that the Amiga(Win) key and Alt keys are swapped on both sides so that LAlt becomes LAmiga and LWin becomes LAlt. And the same thing on the right side. This makes all normal hotkeys (like cut/copy/paste) become RAlt+x,c,v instead of RAmiga+x,c,v. I can't quite see how this happened. And I just confirmed that I am not alone to experience this. It also happened with the dedicated AmigaOne keyboard.

I'm using a Swedish keyboard and Swedish layout with a euro sign that I just now noticed I can't type either! Should be the s_ISO-8859-15 keymap. Might be worth mentioning that YAM always complains that I use "ISO-8859-1" when I have in fact configured "ISO-8859-15" in Input prefs.
User avatar
MichaelMerkel
Beta Tester
Beta Tester
Posts: 355
Joined: Mon Dec 20, 2010 2:08 pm
Location: Germany
Contact:

Re: Alt and Amiga keys are swapped on USB kbd.

Post by MichaelMerkel »

Deniil wrote:I have never used a USB keyboard before, but now on the X1000 I have to of course.

Problem I have (on both of my two totally different USB keyboards) is that the Amiga(Win) key and Alt keys are swapped on both sides so that LAlt becomes LAmiga and LWin becomes LAlt. And the same thing on the right side. This makes all normal hotkeys (like cut/copy/paste) become RAlt+x,c,v instead of RAmiga+x,c,v. I can't quite see how this happened. And I just confirmed that I am not alone to experience this. It also happened with the dedicated AmigaOne keyboard.
afaik you need to do the following setting in cfe:

Code: Select all

setenv -p keymap_swapaltamiga off
the default keyboard delivered with the x1000 has the keys swapped. and this is the default. to make other keyboards work you need to disable the swapping.
at least that is what i think i read that days...

regards...
michael
Michael Merkel :lol:
(Member of Amiga Freunde Pfalz)
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Alt and Amiga keys are swapped on USB kbd.

Post by nbache »

Deniil wrote:I'm using a Swedish keyboard and Swedish layout with a euro sign that I just now noticed I can't type either! Should be the s_ISO-8859-15 keymap. Might be worth mentioning that YAM always complains that I use "ISO-8859-1" when I have in fact configured "ISO-8859-15" in Input prefs.
You need first of all to make sure your system charset is ISO-8859-15, if that's what you want.

This is done by clearing the list of preferred languages in Locale prefs, then selecting as the first one a language with that charset (in your case I assume you'd want swedish_ISO-8859-15), then, if you like, other languages such as English or whatever. Those don't matter for this issue, it is the first language which determines the system charset.

It is not enough to select the corresponding keymap in Input prefs.

Best regards,

Niels
Deniil
Posts: 109
Joined: Mon Jul 11, 2011 6:59 pm

Re: Alt and Amiga keys are swapped on USB kbd.

Post by Deniil »

@MichaelMerkel

Thanks! I'll try that.

@nbache
This is done by clearing the list of preferred languages in Locale prefs, then selecting as the first one a language with that charset (in your case I assume you'd want swedish_ISO-8859-15), then, if you like, other languages such as English or whatever. Those don't matter for this issue, it is the first language which determines the system charset.
What??! So I can't write in Swedish on a Swedish keyboard while having the system in English!? That's the silliest thing I've ever heard :-)
I will NOT configure the system to any language other than English because it looks silly and I won't understand what menu items etc. mean in Swedish. But that does not mean I want to use an English layout, and as far as I could tell, I'm not, except I can't type the € sign. But ÅÄÖ works normally.

But why do I not have this problem on my A1-XE with update 5 and the same keyboard then (although plugged into PS/2)? I could try importing its settings and see what happens.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Alt and Amiga keys are swapped on USB kbd.

Post by nbache »

Deniil wrote:What??! So I can't write in Swedish on a Swedish keyboard while having the system in English!? That's the silliest thing I've ever heard :-)
I will NOT configure the system to any language other than English because it looks silly and I won't understand what menu items etc. mean in Swedish. But that does not mean I want to use an English layout, and as far as I could tell, I'm not, except I can't type the € sign. But ÅÄÖ works normally.
In that case, simply select English_ISO-8859-15 as your (first or only) preferred language in your Locale prefs. The main thing is you need ISO-8859-15 to be your system charset to be able to get a euro sign; it simply does not exist in ISO-8859-1. And since Locale selects or maps the fonts to match the system charset (unless explicitly told otherwise), it won't exist in your font either - or the subset of it mapped to your charset, in case of e.g. a multilingual TTF font .

I would think you would be able to select a Swedish keymap in Input even if your preferred language has been set to English, and get the combination you're after.

Best regards,

Niels
Deniil
Posts: 109
Joined: Mon Jul 11, 2011 6:59 pm

Re: Alt and Amiga keys are swapped on USB kbd.

Post by Deniil »

@MichaelMerkel

I couldn't find any such environment variable. Are you saying that it defaults to swapped in the driver??!

AmigaKit should make sure this variable is set correctly depending on if they deliver the X1000 with this keyboard or not.

@nbache

I have to check the language setting then. But as far as I remember there is only language, no charset setting here. but I have to check again, and compare with my XE settings, which doesn't have this problem.
User avatar
MichaelMerkel
Beta Tester
Beta Tester
Posts: 355
Joined: Mon Dec 20, 2010 2:08 pm
Location: Germany
Contact:

Re: Alt and Amiga keys are swapped on USB kbd.

Post by MichaelMerkel »

Deniil wrote:@MichaelMerkel

I couldn't find any such environment variable. Are you saying that it defaults to swapped in the driver??!
yes. the default ist "yes" and as such the variable is not present. you need to define it int he cfre shell and set it to "no".
didn't it help?!
AmigaKit should make sure this variable is set correctly depending on if they deliver the X1000 with this keyboard or not.
afaik only complete x1000 systems are to be sold. this includes the "default" keyboard which has the keys swapped. isn't it like that?

regards
michael
Michael Merkel :lol:
(Member of Amiga Freunde Pfalz)
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Alt and Amiga keys are swapped on USB kbd.

Post by nbache »

Deniil wrote:@MichaelMerkel

I couldn't find any such environment variable. Are you saying that it defaults to swapped in the driver??!
On the X1000, the default in the driver (i.e. what it does with no variable set) is swapped (because the X1000 comes with the keyboard where the physical keys are swapped), on all other platforms the default is not swapped.
I have to check the language setting then. But as far as I remember there is only language, no charset setting here. but I have to check again, and compare with my XE settings, which doesn't have this problem.
The thing is, it's not too obvious that you are also setting the charset. If you clear the languages, the list of languages to select from gets longer and includes the various charset variants (some of them are even marked with a Euro sign in parentheses). But once you select the first language (and its charset), the list shrinks to just the main language names, as that is all you can select for secondary languages. So you only get the clue that this is also about charsets if you clear the languages first.

Best regards,

Niels
Deniil
Posts: 109
Joined: Mon Jul 11, 2011 6:59 pm

Re: Alt and Amiga keys are swapped on USB kbd.

Post by Deniil »

@nbache

I see! That really wasn't obvious at all! When I clear the languages i showed all the charsets as well.

IMO it should always show all charsets but greyed out so you can't select them or something.

@MichaelMerkel

It did help. But the keyboard and mouse are sold as extras, although they may be ticked by default. An English keyboard is not of that much use to non-English-only people. And a keyboard without MM keys is completely out of the question for me. I wouldn't expect more than half of buyers at most buy that keyboard and I think AmigaKit should make sure the machine they deliver matches the input it will be used with. Having the driver defaulting to some (misbehaving?) proprietary extras is a bad idea.
Post Reply