Getting volume keys to work in KDE

2009-03-12 Thread Shachar Shemesh

Hi all,


I tried to find an answer to this one on the net, and got only things 
that got me in the right direction, but not a complete answer. For the 
sake of documentation, here is how to get KDE to recognize your volume 
keys (or, for that matter, any other special key). The fact that it 
doesn't happen automatically is probably a bug in the keyboard layout 
code. I might file it there. This method works with no special processes 
running. It works whether kmix is running or not. It causes KDE to 
display visual feedback to the fact that the volume is changing.



First order of business is finding out what is the keycode for your 
misfunctioning keys. Run xev. A new window appears, and any message 
sent to that window appears in the console that ran xev. Be careful not 
to move your mouse or press any key other than the ones you want mapped, 
as the messages form very quickly.



Next, with the xev window active, press the keys you want to map. Your 
output should look something like this:




KeyPress event, serial 34, synthetic NO, window 0x2a1,
root 0x13b, subw 0x0, time 61891190, (-690,-222), root:(785,703),
state 0x0, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2a1,
root 0x13b, subw 0x0, time 61891190, (-690,-222), root:(785,703),
state 0x0, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x2a1,
root 0x13b, subw 0x0, time 61892564, (-690,-222), root:(785,703),
state 0x0, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x2a1,
root 0x13b, subw 0x0, time 61892564, (-690,-222), root:(785,703),
state 0x0, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

This tells me that the key for reducing the monitor's brightness has a 
keycode of 101, and for increasing it of 212. Record the keycodes for 
all keys you are interested in. Also, notice that after the keycode you 
get, in brackets, keysym 0x0, NoSymbol. This indicates that the 
keyboard mapping does not know what this key means. If the key is 
defined, you output should look something like:

KeyRelease event, serial 35, synthetic NO, window 0x2a1,
root 0x13b, subw 0x0, time 62033566, (-65,-284), root:(1410,641),
state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), 
same_screen YES,

XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x2a1,
root 0x13b, subw 0x0, time 62035609, (-65,-284), root:(1410,641),
state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), 
same_screen YES,

XLookupString gives 0 bytes:
XFilterEvent returns: False

This means that I have already implemented what I'm writing about here, 
and keycodes 174 and 176 are already mapped to the Audio down and up 
respectively. If that is what you get, and the symbol indeed matches the 
key's caption, this guide will not help you (but check out a setting 
called global shortcuts in the program that controls the relevant 
operation).


Also, if you press the key and nothing happens, this guide is also 
incapable of helping you. I would recommend switching to the textual 
console and pressing the key. If you get a message from the kernel 
saying that an unknown scan code was received, the situation is still 
salvagable. You can tell the kernel to map the scan code to the right 
keycode. If junk is displayed then the situation may or may not be 
salvagable. It might mean that the kernel misunderstands the scan code, 
but it might also mean (happened to me with a Microsoft PS/2 keyboard 
connected through a PS/2-USB adapter) that something in the hardware 
munges the scan code. If nothing at all happens, it is possible that the 
scan code never reaches the kernel, and then there is very little anyone 
can do.


The next order of business is to tell KDE to make a map between the key 
code and the proper key sym. For that, we need a list of valid key 
symbols. On Debian, you can find this list in /usr/share/X11/XKeysymDB. 
Find there the right symbol for the key. For the audio keys, these are 
XF86AudioLowerVolume (volume down), XF86AudioRaiseVolume (volume up) and 
XF86AudioMute (mute). I'm sure the rest are fairly self explanatory as 
well (well, not all of them. For example, XF86Display is the key that 
switches between monitors - not exactly trivial mapping).


Last, we want the KDE startup to make these mappings (which, like I 
said, probably should go into the PC keyboard definition - if anyone has 
the volume keys bound to a 

Re: Getting volume keys to work in KDE

2009-03-12 Thread Dotan Cohen
2009/3/12 Shachar Shemesh shac...@shemesh.biz:
 Hi all,

 I tried to find an answer to this one on the net, and got only things that
 got me in the right direction, but not a complete answer. For the sake of
 documentation, here is how to get KDE to recognize your volume keys (or, for
 that matter, any other special key). The fact that it doesn't happen
 automatically is probably a bug in the keyboard layout code. I might file it
 there. This method works with no special processes running. It works whether
 kmix is running or not. It causes KDE to display visual feedback to the fact
 that the volume is changing.

 First order of business is finding out what is the keycode for your
 misfunctioning keys. Run xev. A new window appears, and any message sent
 to that window appears in the console that ran xev. Be careful not to move
 your mouse or press any key other than the ones you want mapped, as the
 messages form very quickly.

 Next, with the xev window active, press the keys you want to map. Your
 output should look something like this:

 KeyPress event, serial 34, synthetic NO, window 0x2a1,
     root 0x13b, subw 0x0, time 61891190, (-690,-222), root:(785,703),
     state 0x0, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: False

 KeyRelease event, serial 34, synthetic NO, window 0x2a1,
     root 0x13b, subw 0x0, time 61891190, (-690,-222), root:(785,703),
     state 0x0, keycode 101 (keysym 0x0, NoSymbol), same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False

 KeyPress event, serial 34, synthetic NO, window 0x2a1,
     root 0x13b, subw 0x0, time 61892564, (-690,-222), root:(785,703),
     state 0x0, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
     XLookupString gives 0 bytes:
     XmbLookupString gives 0 bytes:
     XFilterEvent returns: False

 KeyRelease event, serial 34, synthetic NO, window 0x2a1,
     root 0x13b, subw 0x0, time 61892564, (-690,-222), root:(785,703),
     state 0x0, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False

 This tells me that the key for reducing the monitor's brightness has a
 keycode of 101, and for increasing it of 212. Record the keycodes for all
 keys you are interested in. Also, notice that after the keycode you get, in
 brackets, keysym 0x0, NoSymbol. This indicates that the keyboard mapping
 does not know what this key means. If the key is defined, you output should
 look something like:

 KeyRelease event, serial 35, synthetic NO, window 0x2a1,
     root 0x13b, subw 0x0, time 62033566, (-65,-284), root:(1410,641),
     state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume),
 same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False

 KeyRelease event, serial 35, synthetic NO, window 0x2a1,
     root 0x13b, subw 0x0, time 62035609, (-65,-284), root:(1410,641),
     state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume),
 same_screen YES,
     XLookupString gives 0 bytes:
     XFilterEvent returns: False

 This means that I have already implemented what I'm writing about here, and
 keycodes 174 and 176 are already mapped to the Audio down and up
 respectively. If that is what you get, and the symbol indeed matches the
 key's caption, this guide will not help you (but check out a setting called
 global shortcuts in the program that controls the relevant operation).

 Also, if you press the key and nothing happens, this guide is also incapable
 of helping you. I would recommend switching to the textual console and
 pressing the key. If you get a message from the kernel saying that an
 unknown scan code was received, the situation is still salvagable. You can
 tell the kernel to map the scan code to the right keycode. If junk is
 displayed then the situation may or may not be salvagable. It might mean
 that the kernel misunderstands the scan code, but it might also mean
 (happened to me with a Microsoft PS/2 keyboard connected through a PS/2-USB
 adapter) that something in the hardware munges the scan code. If nothing at
 all happens, it is possible that the scan code never reaches the kernel, and
 then there is very little anyone can do.

 The next order of business is to tell KDE to make a map between the key code
 and the proper key sym. For that, we need a list of valid key symbols. On
 Debian, you can find this list in /usr/share/X11/XKeysymDB. Find there the
 right symbol for the key. For the audio keys, these are XF86AudioLowerVolume
 (volume down), XF86AudioRaiseVolume (volume up) and XF86AudioMute (mute).
 I'm sure the rest are fairly self explanatory as well (well, not all of
 them. For example, XF86Display is the key that switches between monitors -
 not exactly trivial mapping).

 Last, we want the KDE startup to make these mappings (which, like I said,
 probably should go 

Re: Getting volume keys to work in KDE

2009-03-12 Thread Shachar Shemesh

Dotan Cohen wrote:



Thank you Shachar.

You didn't really need to quote the entire thing just to say that, did you?

 I would like to either post this to the KDE and
Kubuntu lists, or republish it on a webpage so that people can find
it. What say you?

  
Consider it free under the CC-BY-SA license (which is a free license - 
not all CC licenses are).

http://creativecommons.org/licenses/by-sa/2.5/il/

Shachar


--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Getting volume keys to work in KDE

2009-03-12 Thread Dotan Cohen
 You didn't really need to quote the entire thing just to say that, did you?


No, I thought that I was holding Shift when I pagedowned but I wasn't,
so the delete key did nothing. I saw that after I posted already!

  I would like to either post this to the KDE and
 Kubuntu lists, or republish it on a webpage so that people can find
 it. What say you?

 Consider it free under the CC-BY-SA license (which is a free license - not
 all CC licenses are).
 http://creativecommons.org/licenses/by-sa/2.5/il/


I'll put it up on dotancohen.com and send a link to the relevant
lists. I know that many people complain about this. Thanks!

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Getting volume keys to work in KDE

2009-03-12 Thread Shachar Shemesh

Dotan Cohen wrote:



I'll put it up on dotancohen.com and send a link to the relevant
lists. I know that many people complain about this. Thanks!

  

You can just point them to the archives for this list:
http://creativecommons.org/licenses/by-sa/2.5/il/

Better still, in a couple of minutes I'll have the article up on the 
Lingnu web site. I would rather you link directly there. This way, I can 
update it should there be any erratas.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Getting volume keys to work in KDE

2009-03-12 Thread Shachar Shemesh

Dotan Cohen wrote:



I'll put it up on dotancohen.com and send a link to the relevant
lists. I know that many people complain about this. Thanks!

  

Please link to http://www.lingnu.com/en/howto/58-kdevolume.html

Thanks,
Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Getting volume keys to work in KDE

2009-03-12 Thread Dotan Cohen
 Please link to http://www.lingnu.com/en/howto/58-kdevolume.html


I just finished publishing it on dotancohen.com but I will remove it
and link to that on the KDE and Kubuntu lists. Thanks, Shachar, it
will help quite a few people.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Getting volume keys to work in KDE

2009-03-12 Thread Shachar Shemesh

Dotan Cohen wrote:


Please link to http://www.lingnu.com/en/howto/58-kdevolume.html




I just finished publishing it on dotancohen.com but I will remove it
and link to that on the KDE and Kubuntu lists. Thanks, Shachar, it
will help quite a few people.

  
Feel free to keep it up if you want (I did release it as CC), but make 
sure you link to the Lingnu copy by way of giving credit.


Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Getting volume keys to work in KDE

2009-03-12 Thread Dotan Cohen
 Feel free to keep it up if you want (I did release it as CC), but make sure
 you link to the Lingnu copy by way of giving credit.


There is no sense in that. I am aware that some people like to have
all kinds of random information on the 'blogs' to run ads on, but
that's not me. Keeping the info on one page is better for maintenance
(the document will have to be maintained) and won't confuse users who
find two different versions of the same page.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: I'm Looking for a Job

2009-03-12 Thread Dotan Cohen
 I think you have a chance to benefit much more than some more calories
 in your love handles - you'll learn a new technology for your toolbox,
 get some exposure, and get another point to put in your resume.


Of course, I am sure that Shlomi was it that way. I would not have
asked had I thought that money/food was the reason. I only offer it to
show my personal appreciation, not as payment.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


[Telux] Next Meeting: High-Level Programming Concepts Using Perl 6 on 22-March

2009-03-12 Thread Shlomi Fish
Hi all!

The Tel Aviv Open Source Club will host part one of a series of talks by Gabor 
Szabo ( http://www.szabgab.com/ ) about High-Level Programming Concepts Using 
Perl 6 - on 22-March-2009.

The meeting will take place at Tel Aviv University, at the Schreiber MathsCS 
building, room 008 on 18:30. So mark your calendars. For more information can 
be found at:

* http://www.cs.tau.ac.il/telux/

* http://wiki.osdc.org.il/index.php/Tel_Aviv_Meeting_on_22_March_2009

With any other problems, feel free to contact me:

http://www.shlomifish.org/me/contact-me/

Abstract:
-

High-level programming concepts using Perl 6

A series of presentations on learning and using Perl 6 from the ground up to 
the special features.

Many would think that Perl 6 is just a new version of Perl and that it might 
only be interesting for Perl programmers. However, Perl 6 is in fact a 
compiled language running on a virtual machine that embraces many new concepts 
not found in most programming languages.

The presentations will be equally interesting for Perl, Java and C# 
programmers.

During the series of talks we will start by learning the basics of the 
language and will get to various high level concepts. For now we plan 2 
sessions but if we need more time we'll schedule more meetings.

Note

After the talk we go to the café at the main entrance where we can continue 
the discussion. If people bring portable computers, we can get the off the 
ground on the spot. VirtualBox images will be provided with everything that is 
needed for playing with Perl 6 set up inside. So you may opt to bring a 
computer with VirtualBox installed. 

--

We are always looking for presentations on interesting topics. If you have an 
interesting idea for a talk, feel free to contact us and we'll co-ordinate a 
date.

Regards,

Shlomi Fish

-- 
-
Shlomi Fish  http://www.shlomifish.org/

maukeI'm not interested in what you're doing; what are you trying to 
   achieve?
PerlJam  mauke: I'm trying to achieve world peace and this regex is
   the last thing standing in my way! ;)




___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Getting volume keys to work in KDE

2009-03-12 Thread Yuval Hager
  here is how to get KDE to recognize your volume
 keys (or, for that matter, any other special key).

Thanks for the guide! worked perfectly, as advertised. 

--y


signature.asc
Description: This is a digitally signed message part.
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: kchmviewer problem - correct contents page , but any other page are inaccessible

2009-03-12 Thread Moshe Brace using Yahoo

Hi Lev,
Have you tried to decompile the .chm doc and recompile it? What I mean is you 
may have to use a Windows programme to do this such as Help and Manual or Help 
Scribble. I doubt whether there is a programme to compile ..chm programmes 
using Linux. However, I could be wrong about that. 

It is quite possible that there was an error when the original document was 
compiled in the beginning. Programmes like the above use the Microsoft Help 
File compiler programme (available free) to compress and at the same time make 
the hypertext links live. Some of these programmes convert pictures to ..png 
files. Help and Manual can even produce a live hypertext link .pdf file, which 
obviously should run with Linux. 

I doubt whether you will get an easy answer on this one, but likewise who 
knows. How big is the file? Maybe I might be able to help decompile and 
recompile it.
Moshe


--- On Thu, 12/3/09, Lev Olshvang l...@vboxcomm.com wrote:

 From: Lev Olshvang l...@vboxcomm.com
 Subject: Re: kchmviewer problem - correct contents page , but any other page 
 are inaccessible
 To: Moshe Brace using Yahoo mbrace...@yahoo.co.uk
 Date: Thursday, 12 March, 2009, 12:19 PM
 Hi Moshe,
 
 The kchmviwer is good (I run kubuntu 7.10) , the problem is
 only with 
 this specific doc. Evidently this doc was not created 'by
 the rules', it 
 has some absolute path information inside.
 The question is how to convert it to location independent.
 
 
 Moshe Brace using Yahoo wrote:
  I use Xchm and Gnochm to open the .chm files that I
 wrote and placed on my webpage.
  http:/moshe.lee.co.il 
  My distro is Mandriva 2009.0 Gnome Desktop. 
  Moshe
 
  --- On Wed, 11/3/09, Lev Olshvang l...@vboxcomm.com
 wrote:
 
  From: Lev Olshvang l...@vboxcomm.com
  Subject: kchmviewer problem - correct contents page ,
 but any other page are inaccessible
  To: linux-il linux-il@cs.huji.ac.il
  Date: Wednesday, 11 March, 2009, 8:20 PM
 
  Hi all,
 
  I am trying to open .chm book and kchmviewer correctly
 displays contents page but  then produces 
 the  following error:
 
 
  /An error occurred while loading
 ms-its:/tmp/kde-ttt/arklouxQz/Learning JavaScript, 2nd
 Edition.chm::/Cover.html:
  The file or folder
 ms-its:/tmp/kde-tt/arklouxQz/Learning JavaScript, 2nd
 Edition.chm::/Cover.html does not exist/.
 
 
 
  The length of the archive seems normal, and I
 succesfully made file export to of the book to html files
 using kchmviewr file operations menu.
 
  How to make this book normal ???
 
  ThanX
  L.
 
 
 
 
  ___
  Linux-il mailing list
  Linux-il@cs.huji.ac.il
  http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
 
 
 
        
 
 
    
 
 


  


___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il