This invention is an ergonomic method and apparatus for integrating the operation of computer keyboards and cursor control devices. It employs hand location detection to determine when the mouse hand is absent from its keyboard typing position or is present at the mouse. A detector output automatically transforms the functions of a set of keyboard keys lying under the non-mouse hand from their original actions into new actions which can include mouse clicks, keyboard shortcuts and macros. These keys usually include the home keys (a s d f, or j k l ;). The new functions are preprogrammed into this set of keys at an inactive level, and do not affect actions unless the hand position sensor detects that the mouse hand is absent from its keyboard typing position or is present at the mouse. This invention allows the non-mouse hand to actuate clicks at the keyboard by using the home keys as click switches, and also makes it possible for the non-mouse hand to type, with a single keystroke, keyboard shortcuts not normally available to it. When the mouse hand returns to the keyboard the keys automatically revert to their default functions. This method increases working speed, reduces the number of trips back and forth between keyboard and mouse, and relieves stress on the mouse hand. It is of special value to persons with carpal tunnel syndrome or Repetitive Strain Injuries. Detection of hand position or location is accomplished by sensors at the keyboard and/or at the pointing device, or by software detection of any data output from the mouse (movement or click) or from any keypress on the mouse side of the keyboard. This invention can be embodied solely as software, as firmware in an external device or keyboard, or as any combination of software and firmware. It essentially converts the non-mouse side of the keyboard into single-key macros: mouse buttons, tool selection keys, and special function keys. It can also be used to temporarily assign an alternate set of actions to mouse motion, mouse buttons and scrolling devices. Optionally this invention includes a floating on-screen palette which serves as an indicator of transformation and provides a map of the new functions. With simultaneous transformation of both a keyset and its corresponding palette, the palette always displays the new functions in the same geometric pattern as the actual layout of the new functions on the keyboard. This enables eye-to-hand pattern transfer for intuitive tool selection via the keyboard without using the mouse.