Bugzilla – Attachment 62294 Details for
Bug 50415
Shortcut names are not localized on Linux
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Output of SalDisplay::GetKeyboardName
keysym.c (text/x-csrc), 1.16 KB, created by
Thomas Arnhold
on 2012-05-30 09:49:15 UTC
(
hide
)
Description:
Output of SalDisplay::GetKeyboardName
Filename:
MIME Type:
Creator:
Thomas Arnhold
Created:
2012-05-30 09:49:15 UTC
Size:
1.16 KB
patch
obsolete
>#include <stdbool.h> >#include <stdio.h> >#include <stdlib.h> >#include <X11/X.h> >#include <X11/XKBlib.h> > >int main(int argc, const char * argv[]) { > Display * display; > > //Try to attach to the default X11 display. > display = XOpenDisplay(NULL); > if(display == NULL) { > printf("Error: Could not open display!\n"); > return EXIT_FAILURE; > } > > > int opcode, event, error; > int major = XkbMajorVersion, minor = XkbMinorVersion; > if( XkbQueryExtension( display, &opcode, &event,&error, &major, &minor ) ) > { > XkbDescPtr pXkbDesc = NULL; > // try X keyboard extension > if( (pXkbDesc = XkbGetKeyboard( display, XkbAllComponentsMask, XkbUseCoreKbd )) ) > { > const char* pAtom = NULL; > if( pXkbDesc->names->groups[0] ) > { > pAtom = XGetAtomName( display, pXkbDesc->names->groups[0] ); > > printf("KeyboardName: %s\n", pAtom); > > XFree( (void*)pAtom ); > } > } > } > > //Close the connection to the selected X11 display. > XCloseDisplay(display); > > return EXIT_SUCCESS; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 50415
:
62153
|
62178
| 62294 |
62341
|
62378
|
62521
|
62522
|
62523
|
63695
|
63696