Changing some keys
If you remember my post My MorphOS Systems, then you probably noted the almost Amiga-like keyboard that I have and doesn’t work. Well, as a matter of fact I have found a way to get that keyboard to work. It’s not a pretty solution, but it works.
The problem is that there is no driver for MorphOS, and although it does use the built in hidd system, there are several special keys that simply confuses the heck out of the system. When asked the developers of a solution, some told me that without a keyboard they can’t fix the problem. No one is prepared to both write a driver and pay for the keyboard. And they are also way busy with more pressing things. Maybe if they got a keyboard for free they could work on the problem, but they are expensive. I started to ask around for a solution. In the end, with the help of BSzili I did stumple upon a solution by accident.
Apparently the problem is the N-Key Rollover (NKRO): a windows thing for gamers but often the source of incompatability with MacOS and Linux. I plugged the keyboard in the USB at front, pressed right ALT-F12 and saw the F12 key light up. This means NKRO is on. Then I switched it off and saw that they keyboard suddenly worked! I was thrilled and immedietly plugged out my other keyboard and plugged in the new on in my hub. And now it wasn’t working again. I swithed NKRO on and … it worked. But only partially. Arrow keys and Num pad didn’t work, plus some other keys. Turning NKRO off killed the keyboard again. So I plugged in the old keyboard again in it’s old place and started to look for solutions. And when I plugged in the new keyboard again in the USB plug up front it worked again.
Heureka! The reason seems to be that my new keyboard simply mimics the hidd settings from my old one. So having both keyboard plugged at the same time did the trick. It’s not, like I stated first, a pretty solution but it works. And all I have to do is keeping the old keyboard plugged in and hide it.
However, there was one problem: the right ALT key (RALT) didn’t work at all. It works for switching on NKRO but nothing else. And the butterfly key was the HELP key. The last one I don’t need, but I need RALT. This is where things became a little complicated so without help from some MorphOS users I wouldn’t have been able to figure it out.
First I rearranged the keys so I only have to remap a minimum amount of keys. This is what the keyboard looks like now (not perfect, but close enough for my liking):
Now the butterfly key is a “dead” key (it works in Windows though) but RALT still works as a HELP button (it’s where the butterfly button used to be).
Then I go to Ambient, right click and choose Settings –> System Settings. This is what we will see (with some different icons though):
Press USB. Then this is what you will see:
Click on devices:
Look for your keyboard. Mine is not visiable since it’s in the hub (you can see it above). But it actually works by clicking on my logiteck keyboard as well for some reason. So this is what we are going to do. However, if you can’t do what we are suppose to do by this solution, then unplug your keyboard and insert it into it’s own USB slot. Then it will work. Anyway, let’s click on the logiteck keyboard:
Notice that all these buttons are no longer unselected. Let’s click on Settings:
Now you will see one or several windows that looks like this. Click on Keyboard:
If you only have one window that looks like this it’s easy. If you have several similar windows like I do it means that the same USB plug has several USB devices (I do since I use a hub). So you need to check one by one which of the windows is your keyboard. The way is pretty simple: you click on Track incoming key events and starts typing stuff at random. The window that shows some keys being pressed is the right one. We don’t need to show that so let’s move on to Action:
This is what it will looks like, except that the Track incoming events will not be checked. Press it and then press the faulty key. Then uncheck Track incoming events. If you look at the bottom left you will see what kind of action you need to do to start a process, and to the right what process it shall be. Since I’ve already done this once to fix my HELP-RALT button problem, lets skip right to how my solution looks like:
First you need to mark the processes on the left and delete them. Then you need to click New. On the right I chose Qualifiers (which is the name of keys like ALT, Shift and Amiga) and Trigger: Down. This last one means what will happen when you press down that key. Below thatI chose Set and Right alt as seen on the picture. This of course means that pressing down this key will act as RALT. We are not done though. We also need to create an action of what happens when we unpress the button. So we click on New again, and we do as shown in the picture below:
We still choose Qualifiers, but the Trigger is Up. Below we choose Clear and Right alt. This of course means that when we lift our finger from that button, MorphOS will register that as RALT being unpressed. Without it you will have RALT pressed the whole session when you have pressed it once.
Now I recommend you to press Use. Because if something is wrong you only need to reboot to make the system work like before. Once you have confirmed that everything work like you want to, start Prefs again and look for the above window and press Save. Now your erronous button will work as RALT (or whatever other button you want it to represent).
If you have some special keys on your keyboard that you want to use, I can recommend the program MMKeyboard (you can also download it with Grunch). Here are the programs:
The first program you can use if you want to change something temporary. The last file, ending with WBStartup, you can place in your System:WBStartup drawer if you want the changes to work every time you start MorphOS. If you use the WBStartup version, you have to click on that file in that drawer to do some changes. Lets start the program:
Global Setup… lets you change what kind of keyboard you are using, in case MorphOS got it wrong. And some other stuff I’ve never tried out. System Setup… lets you choose if you want to have CapsLock function be on or off and if you want the ALT and Amiga keys switch places with each other. But let’s turn our attention to MMKeyboard Setup. You can click on New… but since I’ve already played around with this program a little we will click on the existing task (already purpled out) and press Edit… instead:
If you press on Hokey you will be able to press the key you want to use. Below Command Setup you can choose Command Type (WB starts the program like you would double click on it) and below it you choose the path of the program you want started. Press Use –> Use or Use –> Save and if everything works, you should be able to start a program with that button now. In my case I’ve changed the Calculator button so it starts OWB (before it did nothing). But because of the above mentioned keyboard problem I can’t get this to work with my current setting. But it does work with my old keyboard and it’s different set of special keys.
Remember that it’s better to use a program like MMKeyboard first instead of making changes in the system. If something goes wrong with a program it’s usually enough to just delete it. But if something goes wrong in the system, you may have to reinstall the entire OS. Just a fair warning.