OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: scottlfa on November 13, 2007, 02:53:13 am
-
Is there a way to use the settings from the inputconfig.py in xfce4 (or other WM's?)
I am trying to setup my silkscreen and hard buttons on the base row atm and thought it would be ALOT easier if there was a config app for the job. Or a concise way to do it
pdaxrom r198-sp8 +xfce 4.4.1
-
The silkscreen doesn't work AFAIK, and you can run inputconfig.py from the terminal in Xfce4. I don't know if the hard buttons work either, but feel free to try them.
-
Got that hard buttons working with xkeymouse and the brightness control with xbindkeys. Just had to relearn using xev.
No silkscreen is cool, the hard buttons were more important too me.
My .xbindkeyrc file
###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...
# Notes
# Mod2 = @
# m:0x40 = Fn key
#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable
#Brightness Down
"/usr/bin/display-brightness.sh down"
m:0x40 + c:12
# Mod4 + 3
#Brightness Up
"/usr/bin/display-brightness.sh up"
m:0x40 + c:13
# Mod4 + 4
#Backlight On
"bl on"
m:0x40 + c:14
# Mod2 + 5
#Backlight Off
"bl off"
#Volume Down
"vdown"
m:0x40 + c:10
#Volume Up
"vup"
m:0x40 + c:11
# End of xbindkeys configuration
My xkmc
# Present Working Config for Akita C1000
# Map the Calendar/Address/Mail to mouse buttions 1,2,3 respectively
# Calendar
keycode=68, none, Exec, xmms, NoFork, NoAutoRepeat
# Address
keycode=67, none, Exec, gtkterm2, NoFork, NoAutoRepeat
# Mail
keycode=76, none, Exec, gps, NoFork, NoAutoRepeat
# Home - Not Used atm
#keycode=107, none, Exec, thunar, NoFork, NoAutoRepeat
# Menu
keycode=96, none, Exec, xfce4-popup-menu, NoFork, NoAutoRepeat
# Map the Silscreen Buttons
# Calendar - No Xev
# Mail - No Xev
# Address - No Xev
# Contacts - No Xev
# Book - No Xev
My VO ruby script (for volume control from the Fn +1 and Fn +2 keys), Ruby needs to be installed for this to work. Also once you create the VO file, chmod +x VO and then cp the VO file to /usr/local/bin. Link the VO file to vup and vdown.
ln -s /usr/local/bin/VO /usr/local/bin/vup
ln -s /usr/local/bin/VO /usr/local/bin/vdown
The VO script will know which is being used when the keys are pressed. The source of the VO script is OpenZaurus howto site, though I forget where in it.
VO Script
#!/usr/bin/ruby
# AMT number = % of volume increase or descrease.
AMT = 2
lvol = `amixer sget PCM | grep % | grep Left`.scan(/\[(.*)\]/).first.first.delete('%').to_i
rvol = `amixer sget PCM | grep % | grep Right`.scan(/\[(.*)\]/).first.first.delete('%').to_i
ovol = (0.5 * (lvol + rvol)).to_i
change = 0
filename = $0
if filename.include? 'vup' then change = AMT end
if filename.include? 'vdown' then change = -AMT end
tvol = ovol + change
if tvol > 100
tvol = 100
elseif tvol < 0
tvol = 0
end
`amixer sset PCM #{tvol}%`
Hope this helps others, I have yet to get the silkscreen working though. The Xev numbers are for the C1000. These work in XFCE4 on PdaXrom R198 SP8.