Tue, Dec
2 New Articles

Customizing a Keyboard in Personal Communications/400

Collaboration & Messaging
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

It’s the little things that drive people crazy. Take the standard keyboard mapping that comes with IBM’s Personal Communications/400 (PC/400) program. When you use PC/400 to emulate an AS/400 terminal, the default keyboard mapping maps the Enter function to your PC keyboard’s right Control (Ctrl) key while the field exit function is mapped to your keyboard’s Enter key. For PC users, this can be very confusing, as they need to remember that—for PC/400 alone—the Enter key is in a different spot than it is in all their other standard PC applications.

Fortunately, there is a solution. PC/400 has a keyboard mapping function that allows you to create customized keyboard files that remap AS/400 functions to PC keys that are more familiar to your users. In addition, you can use keyboard mapping to assign macros to certain keystroke combinations, copy key definitions from one key to another, and to locate what keys have specific key definitions assigned to them.

In this article, I’ll explain how to create customized keyboard mapping files in PC/400 and assign them to your AS/400 sessions. I show you how to create a keyboard file, assign different values to the keys on your PC keyboard, how to tell PC/400 to use a customized keyboard file instead of IBM’s terminal-style keyboard, and how to export keyboard files to different PCs running PC/400. In the sidebar article, “A Few More Things You Can Do with PC/400’s Mapping Function,” I review some other functions of this valuable feature.


The Keyboard Setup Function


To create a customized keyboard file, go to the keyboard setup function by selecting Assist from PC/400’s menu bar and then selecting Keyboard Setup from the dropdown menu. This displays the Keyboard Setup window shown in Figure 1. By default, your

current keyboard file is set to a standard IBM terminal layout using a 5250- or 3270-style keyboard. To create a different keyboard file that PC/400 can use for keyboard mapping, click on the Customize button. This brings you to the default Customize Keyboard window shown in Figure 2. You’ll notice that this window in divided into three different sections: the Select a Key area that displays a standard 101-key keyboard layout; the Select a Key Action area that allows you to assign macros, standard AS/400 key options, or text characters to specific keys; and the Change Current Actions for Selected Key area that allows you to actually change one of the six mappings that are automatically assigned to a key. You can use one or all three of these options in sequence to change keystroke mappings for any particular key.

One of the things you will notice about the keyboard layout is that this is a standard 101-102 keyboard. There are no special keys for Windows 95 functions, so you cannot remap any of those keys. In addition, there are certain keys and key combinations that you will not be able to remap. For example, you cannot remap the Shift, Caps Lock, and Alt keys. In addition, you cannot remap special keystroke combinations that are either impossible (such as pressing Ctrl-Ctrl) or those combinations used by Windows 95 (such as Alt-Tab).


Mapping a Specific Key


To illustrate how to change a key assignment, let’s change the PC Enter key to actually use the Enter function instead of the default Field Exit assignment PC/400 assigns to it. Using the three areas in sequence, we can change the definition by doing the following.

On the keyboard layout in the Select a Key area, click on the picture of the Enter key. As you do this, you will notice that this updates the Change Current Actions for Selected Key section to display all the current keyboard mapping for the Enter key. For every key in the layout, there are six possible mappings that can be defined. These mappings tell you what function, macro, or text character will be passed to the AS/400 when that key is pressed. The six possible mappings and their meanings are as follows:

• Base—designates what keystrokes are passed when the key is pressed without any other keys being pressed in conjunction with it

• Shift—designates the keystrokes passed when the key is pressed in conjunction with the Shift key

• Ctrl—designates the keystrokes passed when the key is pressed in conjunction with one of the Ctrl keys

• Alt—designates what is passed when pressing the base key in conjunction with one of the Alt keys

• AltGr—what is passed when the Alt, Ctrl (the Ctrl key is labeled “Gr” on Norwegian keyboards), and base key are pressed in conjunction with one another

• CtrlShift—designates what is passed when the Ctrl, Shift, and base key are pressed together

For our purposes, we are only interested in changing the Base setting for this key. Since we are changing it to a specific AS/400 function, we can select and assign the Enter function from the Select a Key-Action area. Do this by performing the following actions:

1. In the Select a Key-Action area, click on the dropdown box labeled Function. Scroll down to the entry in that box labeled Enter and click on that entry to highlight it. This entry must be highlighted to assign it to a key definition.

2. In the Change Current Actions for Selected Key section of the screen, look at the line labeled Base. On the right of that line is the current key definition for the Base mapping

of that key. If you click on the -> button on that line, the current key definition on the right- hand side of the line will change to the default Enter function.

3. In order to enable the change in this file, you must then click on the Change Key button at the bottom of the Change

Current Actions for Selected Key screen. This will mark the change as permanent in your keyboard file. This new key assignment will not be recorded if you forget to click on this button.

This sequence can also be used to assign existing macros or single-character text codes to a base key or any one of its mappings. To change the key assignment on any of the six key mappings, click on the -> button for that mapping. To assign a macro instead of an AS/400 key sequence, click on the Macro dropdown box and select the macro to be assigned. To assign a single character to a key, click on that character in the character scroll bar of the Select a Key-Action area. Always remember to click on the Change Key button for that key or the change will not be recorded when you save the file.

If you make a mistake and want to change your key mapping back to its default PC/400 setting, click on the Default button on the Change Current Actions for Selected Key section of the screen.


The Copy/Move/Swap Key Function


In addition to explicitly assigning a function, macro, or text character to a key, you can also transfer all six key definitions from one key to another key by using the Copy/Move/Swap Key function. For this example, instead of explicitly assigning the Enter function to the base function of the Enter key, you could copy the keyboard definition from the right Ctrl key to the Enter key so that it would function in the exact same manner. Let’s review the steps needed to do this, as well as a few other features.

First, you need to change the Customize Keyboard screen to Copy/ Move/Swap key mode. Do this by selecting Actions from the menu bar and then selecting the Copy/Move/Swap key option from the dropdown menu. This will give you the screen shown in Figure 3. (To return to the default key-mapping mode described above, click on Actions from the menu bar again and then click on the Select a Key-Action option from the dropdown menu.)

The Copy/Move/Swap screen is divided into two sections: one for the key you want to copy your key definitions from (the source key) and another for the key that will receive the new definitions from the source key (the target key). To designate a source key, click on the Select Source Key radio button and then click on the key from the keyboard layout that you want to use as your source. To designate a target key, click on the Select Target Key radio button and then select the key from the keyboard layout that you want to use as your target. In this example, the right Ctrl button is the source key and the Enter key is the target key.

Once the source and target keys are designated, there are four different options you can use. To copy all the definitions for the Source to the Target, click on the Copy button on the Target side of the screen. In this example, the Enter key will have the same definitions as the right Ctrl key. By default, when you select a source and target, all six possible mapping states are highlighted for copying. You can do selective copying by turning off highlighting for those states that you do not want to copy.

The second option you can use is to move your mapping definitions from one key to another. By clicking on the Move button, all eligible key mappings are transferred from the source key to the target key. After the transfer, the key mappings are set to [dead] on the source key side.

A third option is to swap key definitions between the source and target keys. When you click on the Swap button, all eligible key mappings are traded between the source and target keys. It is important to note that there are limitations on using the Move and Swap functions. Move and Swap are only available for defined, eligible key mappings. If you have any key mappings of [pass] or [dead] on either the source or target keys, Move and Swap will not be activated for those key matches. To use Move or Swap when your keys have these definitions, unselect those states that have [pass] or [dead]. The Move and Swap functions will then become active and you can use them.

The fourth and final option is to undo any mapping changes you have made. Do this by clicking on the Undo button. This returns the target key definitions to what they were before the last Copy/Move/Swap function was activated.


Saving a Keyboard File and Using It in PC/400


To save your customized keyboard in a file, click on File in the Customize Keyboard menu bar, and then select Save As in the dropdown menu. If there is no file name assigned, PC/400 will ask you to define a name. The file will then be saved in the following directory:

C:PROGRAM FILESIBMCLIENT ACCESSEMULATORPRIVATE This is the default directory for all customized keyboard files. To specify this file as your default keyboard file in PC/400, go back into the Keyboard Setup window. (That window shown in Figure 1; you get there by choosing Assist from the PC/400 menu bar and then selecting Keyboard Setup from the dropdown menu.) Under Current Keyboard, click on the User-Defined radio button and then specify the location and name of your keyboard file as the Keyboard-File Name. After specifying this file, PC/400 will begin using your keyboard mappings when you access the AS/400.

To move this file to other PC/400 setups, copy the keyboard file you created into the C:PROGRAM FILES IBM CLIENT ACCESSEMULATOR PRIVATE directory on the target machine and specify it as the current keyboard for that installation.


Keyboard Customization—Just a Click Away!


As you can see, PC/400’s mapping function is a quick and powerful tool for making your keyboards match your user and application expectations. And—in that regard—it might be able to remove some of the things that drive your users crazy.


Customizing_a_Keyboard_in_Personal_Communications-_40005-00.jpg 600x450


Figure 1: The Keyboard Setup window allows your users to input text, AS/400 functions, or macros at the touch of a key.


Customizing_a_Keyboard_in_Personal_Communications-_40006-00.jpg 600x450


Figure 2: The Customize Keyboard window allows you to reassign functions to different keystroke assignments.


Customizing_a_Keyboard_in_Personal_Communications-_40007-00.jpg 600x450


Figure 3: The Copy/Move/Swap function allows you to transfer or copy specific key mapping from one key to another.



Support MC Press Online

$0.00 Raised:

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: