Using a Logitech K400 Plus Keyboard with the A1222 Plus

Using a PC oriented keyboard, and especially, one with a touchpad, can present challenges when used on an Amiga. In this blog, I'll outline the challenges, and present my solutions to make this keyboard very usable with the A1222 Plus. Many of these tips apply to other keyboards with other models of computers running AmigaOS4.

Why the Logitech K400 Plus Keyboard?

As mentioned in earlier blogs, my goal in building this A1222 Plus was to create a system as portable as possible and be able to use it by just plugging in one power chord. To meet these goals, I needed a small wireless keyboard with a touchpad, so I don't have to haul around a mouse as well.  I also wanted one that has a "Menu" key and supports multimedia keys. More on this later.

After looking at reviews for multiple keyboards which fit this criterion, I settled on the Logitech K400 Plus keyboard.  Note that this is the "Plus" keyboard.  It has the multimedia keys, where the non "Plus" keyboard does not.
Picture
(Open in new page to see larger view.)
I've used Logitech wireless keyboards with various Amiga models over the years and have never had an issue with them. Since it meets all my criteria it seemed like the logical, safe choice. 

Challenges using a touchpad with AmigaOS4

I have never really liked using touchpads in place of a mouse. I have always found them difficult to perform operations where you have to hold down a mouse button and move the pointer at the same time. This becomes even more of a problem on the Amiga where you hold down the right mouse button and move the pointer to make a menu selection.  Holding the left mouse button down while moving window sliders, selecting and moving groups of icons can also be painful.   

Touchpad Workarounds

Picture
(Open in new page to see larger view.)

Picture

Fortunately, with a bit of experimenting, I've found a couple of ways to make the touchpad much more usable.  The first is provided by the keyboard itself and the other is by changing some settings in the GUI preference.

Keyboard Workaround: 
If you look closely at the keyboard, you will notice a yellow button with a picture of a mouse on it in the upper left-hand corner. Pressing this button is the equivalent to pressing the left mouse button. This makes it easy to move the pointer around with a right-hand finger on the touchpad while holding down the left mouse button with the left hand. The mouse button key and the touchpad being at opposite ends of the keyboard makes this a very comfortable and easy way to perform these actions. 

GUI Settings Workarounds:
Ok, that solves half the problem. Now what about using the right mouse button and touchpad for menu selections. Of course, many menu items have keyboard equivalents, but I rarely remember most of them and what about menu items that don't have keyboard equivalents. If only there was a way to not have to hold down the right mouse button to keep the menus displayed, while making a selection.  Well...it turns out there is.


In the Prefs drawer you will find the GUI preferences program.
Open the GUI preferences program and click on "Menus" in the "Subsystem" list.  Under the "Pull-Down Menus" and "Pop-up Menus" sections, enable the "Sticky panels" selections.
Picture
(Open in new page to see larger view.)
Now the menus will stay open by simply clicking the right mouse button and selections can be made using the touchpad without having to hold down the right mouse button. Much easier to select menu items.

While in the menu setting, I set the following setting as well. "Menu Type" to "Pointer position dependent", to enable context menus, and "Context menus open" to "Centered under pointer", to have the menu pop up with the mouse in the center of the menu. 

Another setting to help minimize required mouse movement is to set the requesters to appear at the current mouse pointer location.  This can be set in the GUI preferences program as shown below. Select the "Options" item from the "Subsystem" list and set the "System requester opening position" setting to "Under mouse pointer".  
Picture
(Open in new page to see larger view.)
The final thing I did to minimize mouse movements, and reduce clutter on my Workbench screen, is to have the parent windows close when I open a new directory window. This can be done from the "Workbench preferences" program. Under Options, select "Close parent automatically.
Picture
(Open in new page to see larger view.)
Now I hear you say, "but I have to use the menu to open the parent drawer if I want to go back to it.".  Well, yes, or you can use the solution I came up with and describe in the "How To Use Multimedia Keys" section below.

What About the "Amiga" keys?

Now we come to the age old problem of using a keyboard designed for a Windows PC with an Amiga.  How do I handle the special "Amiga" keys that aren't available on the keyboard?

Looking at the bottom row of keys on the Logitech K400 keyboard you will see, Ctrl, FN, Windows, alt, space, alt, ctrl, home, pg up/down, and end keys.  Oh no, there is no menu key! Usually, the Windows key will function as the Left Amiga key and the Menu key can be mapped as the Right Amiga key. What to do?   Fear not, there is a workaround.  By default the Left and Right Alt keys will function as the Left and Right Amiga keys respectively.  That's all well and good, but now we don't have Left and Right Alt keys, and unfortunately, as all Amiga users know, from time to time we have to use the CTRL+LALT+RALT keys to perform a hard reset. 
Picture
(Open in new page to see larger view.)
So, here is my solution to this dilemma. The first thing I did was start the Input preferences program and make sure "Swap Alt/Amiga keys" is not selected. (It's selected by default in the A1222 Plus OS4 image.) 
Picture
(Open in new page to see larger view.)
Now the Alt keys work as Left and Right Alt keys, but what about the Amiga Keys?  Well, after switching the Alt keys, the Windows key will function as the Left Amiga key.  That's all well and good but what about the Right Amiga key? It's needed to performing cut/paste and menu selections with the keyboard. There is a solution, and while it's a bit more complicated to setup, and takes a little getting used to, it works well.

On OS4Depot, you will find Daniel Westerberg's program called "allkeys.lha".  This program allows you to map keys, including multimedia keys, to act like other keys, execute Arexx scripts, or to start programs.  More on this later, but for now we are interested in another program that is also contained in this archive.  After unpacking the archive, you will find a directory called "Tools" in the AllKeys directory.  In this directory is a program called, "MapMenu". This program will change the "Menu" key to act as the Right Amiga key. But, "we don't have a menu key", I hear you say. Well, not so fast. It turns out that the "F4" key also functions as a "Menu" key. In fact, all the function keys on the K400 keyboard perform the multimedia functions by default. You have to hold down the "FN" key then the desired function key for function key use. Ok, back to making the "Menu" key act as the "Right Amiga" key.  Place the "MapMenu" program where ever you like.  I moved it to a directory called "MyC" on my system, where I put cli commands that didn't come with the OS by default.  Then add the line shown below to the "S:User-Startup" file. 

Reboot and now your "Menu/F4" key will operate as the "Left Amiga" key. It's not as convenient as having it at the bottom of the keyboard, but I'm finding the more I use it the more I get used to it and it actually works out well.

How To Use Multimedia Keys

The final item to make the keyboard more useful, is to assign those multimedia keys to do something useful. As mentioned above, we can use Daniel Westerberg's "AllKeys" program from OS4Depot to do this. I have used this program on my X1000 for years and I find it really handy. So far, I have mapped most of the top row keys on the Logitech keyboard. I'll show you what I have mapped so far, so you can get an idea of how to use the program and what capabilities it has. 

After unarchiving AllKeys, I suggest moving it to the "Sys:Utilities/Commodities" directory, since it is a commodity. I personally create a "MyCommodities" directory in the Commodities directory, so I can keep track of ones I've added vs. ones that come standard with AmigaOS4. Anyway, once that is done, start the program. The following Window will appear. (Note the list will empty. The picture contains my assignments.)

Picture
(Open in new page to see larger view.)
This window will list the key assignments and the functions they will perform once they are setup. As you can see, I have setup a few keys. Some that just get translated to perform a different keys function, some that execute an AREXX command and some that start a program running. 

This program is much easier to use than it used to be, but it can still be a little tricky, so I'll provide an example of how to setup a key to execute the "Open Parent Window" Workbench AREXX command. The first thing to do is decide which key on the keyboard I want to use to start the calculator. I'll assign the "Back Arrow / F1" key to send the command.  Since we already have AllKeys running, click on the Add button which will open a second window as shown below.  This window will record key presses and display the keycode for the given keys. Unless disabled by the buttons, it will show both the down stroke and upstroke codes.  After pressing the "Back Arrow / F1" key the window will contain the following entries. 

Picture
(Open in new page to see larger view.)
I clicked to highlight the key down key code, then click, "Use Code".
The recording window will close and an entry containing the keycode will be made in the main window. Then I filled in the action I want the key to perform by double clicking in the "ARexx Port" field and typing in "WORKBENCH" as the port name. Next I select the "ARexx Command" field and entered the Arexx command to execute.  In this case, "MENU INVOKE WINDOW.OPENPARENT". Then I clicked "Save". Now the active windows parent drawer window will be opened when the "Back Arrow / F1" key is pressed.  I selected the "Eat" button, so the keycode will not get passed on. If "Eat" is not selected, the keycode will get passed on and used as it normally would by other applications.  

If you just wanted to Translate a key to act as another key, click the "Translate" button and the recorder window will open again.  Once again, press the key you would like the original key to be translated too, highlight, and click "USE".  The new keycode will then be placed in the Translated field in the main window. Once saved the first chosen key will send the translated code of the second key when pressed. The other option is to follow this process and add the full path to the command you want to execute in the "Command" field.

 

My Key Assignments

To date I have assigned the following keys on my A1222 Plus.
Picture
(Open in new page to see larger view.)

There you have it ​​

There it is.  All the trick and tips I have used to make the Logitech K400 Plus very usable with my A1222 Plus system. So far this has been a great little keyboard which fits my needs very well. I've even come to like using the touchpad, instead of having to haul around a mouse and make room to use it.  

Most of these tips can be used with many keyboards. I hope you find something useful here, even if you aren't using a Logitech K400 Plus keyboard.  Let me know in the comments. If you have other ideas which make using multimedia or touchpad keyboards easier I'd love to hear about it.  


What's Next

Next entry I'll finally get into using programs on my A1222 Plus.  I'll start with a review of how well various music playing programs work on the A1222 Plus. After that I'll take a quick detour back to the hardware side and describe how I fit a 10 Watt per channel stereo amplifier and two speakers inside my little case to make it a truly, self-contained, portable system.