Find the answer to your Linux question:
Results 1 to 6 of 6
Does anyone know how to program the function keys F1, ..., F12? I would like to associate some bash scripts to these keys. Thansk in advance tech...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Dec 2004
    Posts
    323

    Programming the function keys


    Does anyone know how to program the function keys F1, ..., F12? I would like to associate some bash scripts to these keys.

    Thansk in advance

    tech

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    The hard version is to modify the keymap although it is not recommended.

    If you use GNOME try with gconf editor.
    If you use other desktop you should look for the appropriate tool.

    Best regards

  3. #3
    Linux User
    Join Date
    Dec 2004
    Posts
    323
    Thanks for your response. Why is modifying the keymap not recommended?

  4. #4
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    If you modify your keymap, your changes will be applied wide in the system. For example, if you attach de Windows key to the string "startx" every user that press the key will bring X up.

    AFAIK if you use Gconf you are modifying only yor preferences, not the other's ones.

    Best regards.

  5. #5
    Linux User
    Join Date
    Dec 2004
    Posts
    323
    So if the machines concerned have one user only and are single boot, then there should be no particular problem modifying the keymap? I will look into both methods and see how they work. Thanks for your responses.

    tech

  6. #6
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    I strongly recommend you the Gconf way if your are going to work in graphical mode. The window manager manages the mouse clicks, so it is posible that it processes the events first (think about a Ctrl+Alt+Sup sequence... it is processed by the graphical environment and shows a dialog, but in console mode that sequence produces an instant reboot)

    Best regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •