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

  • SEARCH
  • Home
  • 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 8471335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:46:06+00:00 2026-06-10T16:46:06+00:00

Background: I am currently in the process of creating a simple VNC viewer embedded

  • 0

Background: I am currently in the process of creating a simple VNC viewer embedded in a QWidget for use on Windows. For this, I compiled the Qt-only VNC version of KRDC (remote desktop viewer for KDE) as well as its dependency libvncclient on windows. The problem which arose now however lies in the way krdc sends key events over vnc: it simply sends the value of QKeyEvent::nativeVirtualKey(), which on X11 is conveniently already a valid RFB keysym. On Windows however, this is not the case.

Now, to solve this problem, I think the best (and ultimately also portable) way is to translate Qt’s QKeyEvent::key() and ::modifier() data back to valid X11/RFB keysyms. This seems somewhat complex though given that I need to pick different keysyms depending on modifier state (XK_a vs XK_A, I’ve only considered shift so far) as well. Looking into how X11 -> Qt translation is done in Qt’s source code didn’t really help either.

Might there already be a library or code snippet out there which accomplishes this? Or should I just attempt to write my own (incomplete) translation routine? If so, what would be the best way to go about this and also, are there other caveats related to X11 I should be aware of?

  • 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-06-10T16:46:07+00:00Added an answer on June 10, 2026 at 4:46 pm

    Well, seems like I’m actually blind; there was a reference in krdc’s code, right below the e->nativeVirtualKey() statement, referencing another project’s class where they encountered the exact same problem as me:

    // hmm, either Win32-platform or too old Qt so we have to handle and
    // translate Qt-key-codes to X-keycodes
    

    I didn’t test their solution but it seems solid. As I only discovered this now, I have already written a small routine myself which should work ok for most latin keyboards (but will probably break if the Qt team changes any of the Qt::Key values), if anyone is interested in it: link

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

Sidebar

Related Questions

Background : I'm currently, for my University, creating some simple apps showcasing the possible
I am currently using Resque for my background process but recently I heard a
I am building an application and currently am in the process of add backgrounds
Background Currently in a project of mine I am using jQuery autocomplete for a
Background Currently, I am working on a Rails application. I have different products that
Background : I'm currently writing a greasemonkey script that embeds/modifies a specific page's html.
Problem background I am currently developing a framework of Ant Colony System algorithms. I
Some background I'm currently building a predominantly classic web app (rather than a single
Some background I'm currently working on a mobile site so I keep switching user
Some historic background: I'm currently working with Wowza and attempting to decode the AMFPackets

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.