Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th October 2012, 05:51 AM
sashko Offline
Registered User
 
Join Date: Jun 2004
Posts: 16
linuxfirefox
no luck with setkeycodes

I'm trying to make screen rotation button functional on thinkpad x230t. Need to do
Code:
setkeycodes 0x67 132 0x6c 120
at system startup. Reading around the internets it seems to be very simple, but for some reason I cant make it work.

So far have tried

/etc/init/setmycodes.conf
Code:
description "remapping screen rotation buttons on thinkpad x230t"
start on startup
exec /bin/setkeycodes 0x67 132 0x6c 120
have tried
/etc/rc.local
Code:
#!/bin/sh 
# 
# /etc/rc.local: Local multi-user startup script. 
# remapping screen rotation buttons on thinkpad x230t 
# 
touch /var/lock/subsys/local 
 
setkeycodes  0x67 132 0x6c 120 
exit 0
and oldschool way of placing my script in /etc/init.d/setmycodes.sh, symlinking it to /etc/rc5.d/S91setmycodes.sh

Unfortunately nothing works. At the end of a day the button has no keycode and I am reading /var/log/messages to find

Code:
Oct 26 00:36:29 localhost kernel: [52975.153112] atkbd serio0: Unknown key released (translated set 2, code 0x6c on isa0060/serio0).
Oct 26 00:36:29 localhost kernel: [52975.153119] atkbd serio0: Use 'setkeycodes 6c <keycode>' to make it known.


The worst thing is that
Code:
 sudo setkeycodes 0x67 132 0x6c 120
works perfectly. What am I missing?
__________________
F16, F17 x86_64
Reply With Quote
  #2  
Old 30th October 2012, 08:51 PM
sashko Offline
Registered User
 
Join Date: Jun 2004
Posts: 16
linuxfirefox
Re: no luck with setkeycodes

thanks everybody for your help and valuable suggestions. The problem has been solved by creating a new systemd unit
/etc/systemd/system/graphical.target.wants/setmykeys.service

Code:
[Unit]
Description=Set my keycodes for screen rotation
After=systemd-user-sessions.service

[Service]
Type=oneshot
RemainAfterExit=True
ExecStart=/bin/setkeycodes  67 132 6c 120

[Install]
WantedBy=graphical.target

the solution has been found after reading
http://forum.russianfedora.ru/viewtopic.php?f=15&t=4352
https://fedoraproject.org/wiki/Systemd
https://fedoraproject.org/wiki/How_t...stemd_problems
__________________
F16, F17 x86_64
Reply With Quote
Reply

Tags
f1764bit, help or suggestion, luck, setkeycodes, startup script, thinkpad x230t

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
If it wasn't for bad luck... glennzo Linux Chat 43 12th April 2011 12:25 AM
atkbd.c setkeycodes e06e messages shan_t Using Fedora 0 5th November 2007 11:44 PM
Anyone have luck with FC6 PPC on PS3 yet? Iroc_Z28 EOL (End Of Life) Versions 0 9th April 2007 07:11 AM
Cherry Linux Keyboard + setkeycodes problem Jon Farley Using Fedora 5 27th November 2005 01:43 PM


Current GMT-time: 22:51 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat