Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 933835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:53:50+00:00 2026-05-15T20:53:50+00:00

I am able to create keyboard shortcuts for Ctrl-F1 and Ctrl-F2, making them launch

  • 0

I am able to create keyboard shortcuts for Ctrl-F1 and Ctrl-F2, making them launch a script, using the Control Center interface, Input Actions section. The platform of interest is KDE 3.5 on CentOS 5 at present, but 4.x is also of
less immediate interest.

What I need, however, is to create the same shortcuts from a shell script, run after installation of an RPM: this RPM creates a user and then preconfigures its KDE environment completely. So far, I’ve been able to do stuff like

cat > kdesktoprc <<- EOM
[Desktop0]
WallpaperMode=NoWallpaper
EOM

and then upon first login the KDE setup would pick up from there just fine.
I guess what I am trying to do is preseeding this specific account, but I
don’t want to interfere with any other present or future account on the
same host.

Unfortunately, I have not been able to make the same work with Input
Actions, whose configuration is somewhat more involved. Before attempting
to unravel it further, I decided to ask if there was a better way.

In other words, is there a command to create a keyboard shortcut (I don’t
think I can use DCOP, because KDE would not be running at the time) ?

I skimmed hints to the kconf_update mechanism, but was unable to ascertain if it was appropriate for my use case: is there a reference available ?

Thank you in advance,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:53:51+00:00Added an answer on May 15, 2026 at 8:53 pm

    I found an approach which appears to work. First, I create a .khotkeys file,
    call it zzz.khotkeys, and store it under /usr/hsare/apps/khotkeys. A good
    starting point for that is the printscreen.khotkeys file.

    This .khotkeys file has two sections, a [Data] section with the hotkey definition(s), and a [Main] section where among other keys we have

    Id=zzz
    

    which is used to remember which key definitions have been already imported.

    To put the definitions in zzz.khotkeys into effect, you could use this

    /usr/lib/kconf_update_bin/khotkeys_update --id zzz
    

    which seems to invoke functionality equivalent to the “Import” button in
    the “Input Actions” user interface.

    This step incurs a number of obstacles in my scenario, which is running all
    of the abovce in the %post script of an RPM install.

    First, khotkeys_update fails if it cannot contact an X server; on the
    surface this seems silly, as it should only need to perform text wrangling,
    but this can be addressed by placing its invocation inside a .desktop file in .kde/Autostart.

    Second, khotkeys_update does not exactly look like a published interface
    which can be relied upon over time; since this is for CentOS/KDE 3.5 in
    a context where little evolution is expected, I enjoy the privilege to
    consider this a minor issue. If there is a published (shell) interface to
    perform the import, I could not find it (I did not investigate DCOP).

    In the end, the same script which directly customized other configuration
    files under .kde/share/config also adds under .kde/Autostart a file named
    zzz-keys.desktop which looks like

    [Desktop Entry]
    Encoding=UTF-8
    Type=Application
    Name=ZZZ Hotkeys
    Comment=Ensure ZZZ keyboard shortctus are available
    Exec=/usr/lib/kconf_update_bin/khotkeys_update --id zzz
    

    which gets the hotkeys added the first time (they end up inside khotkeysrc)
    and is skipped on subsequent invocations, because khotkeysrc includes a key
    name AlreadyInstalled which is also updated to include “zzz”, so on
    subsequent runs khotkeys_update finds it and does not add duplicates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.