Pages: [1]
Print
Author Topic: Cycas provokes problem with ALTGR  (Read 5718 times)
diogo.urb
Newbie
*
Posts: 42


View Profile
« on: September 26, 2009, 12:22:02 AM »

Hi everyone,

         From sometime now I´ve dealing with a bug on Linux and couldn´t find out where that bug came from... it happened on all the distributions I had on my laptop... after a while my (swiss german layout keyboard) ALTGR starts to behave as Enter....

         Yesterday I found out that it actually happens when I start Cycas...
         I couldn´t find out why it does that... put now I´m sure starting cycas on whatever distribution I have make my ALTGR starts behaving as an Enter and it is irreversible unless I restart X.org, but I have a swiss german layout keyboard so loosing ALTGR means I loose lots of keys that are fundamental like:

| @ # ´ ~ [ ] { } \n
         So... can anyone see if it happens with anyone else

As it happened on any distro in the last 3 months, my system shouldn´t be a problem, also to remind it happens on gnome, kde, openbox, pekwm, fluxbox, no matter the DE

         But in any case here is my system:

  • Laptop Pavilion DV9680ez - swiss german keyboard
    [li]Mandriva Cooker (2010.0RC1-Updated) X86_64
    [li]X.Org X Server 1.6.3.901 (1.6.4 RC 1)
    [li]Linux localhost 2.6.31-desktop-2mnb #1 SMP Mon Sep 14 11:29:50 EDT 2009 x86_64 Intel(R) Core(TM)2 Duo CPU     T7250  @ 2.00GHz GNU/Linux
Logged
xluis
Jr. Member
**
Posts: 94



View Profile
« Reply #1 on: September 30, 2009, 08:59:43 AM »

Hallo.
I´ve have made a proof in my laptop and it has no problem. Even ALTGR works fine on cycas texts.

Laptop Pavilion hp8730w - spanish keyboard
Opensuse 11.0+KDE 3.5.9 "release 49.1" - X86_64, german installation
Linux 2.6.25.20-0.5-default x86_64
Intel(R) Core(TM)2 Duo CPU T9600 @ 2.80GHz
Logged
diogo.urb
Newbie
*
Posts: 42


View Profile
« Reply #2 on: September 30, 2009, 11:38:04 AM »

Then here comes the question... this is a problem related to Xserver... so would it be related to SwissGerman + Xorg 1.6+ + Cycas?

I´m saying that because I´m trying everything again... and it happens exactly when I open Cycas.
Logged
xluis
Jr. Member
**
Posts: 94



View Profile
« Reply #3 on: October 01, 2009, 05:50:39 PM »

I have not a lot to say about it.
My first Linux was Mandrake 9.X on hp pavilion zd7010ea, about 5-6 years ago. Later I tried OpenSUSE and I still stay on. I´ve never found a problem like you in my pavilion.
Logged
steve
Sr. Member
****
Posts: 261



View Profile
« Reply #4 on: October 01, 2009, 08:09:39 PM »

diogo, i have the same behaviour as you...right alt key acts as "enter"

us keyboard, ubuntu 9.04 on a desktop.

i never noticed it before, because i don´t use that key!
Logged
diogo.urb
Newbie
*
Posts: 42


View Profile
« Reply #5 on: October 26, 2009, 10:45:39 AM »

So I decided to try changing the functionality of third level switch, which by default is ALT_GR, to other key to see if cycas was affecting ALT_GR or third level key

The new key add to do the lv3 was the menu_switch... and after loading cycas, alt_gr started to work as enter but menu_switch kept working as lv3 switch

This means that cycas is making only right_alt into enter and not other keys, why?
I have no idea... but my work around was to get other key that I don´t use like menu and change it to make the things alt_gr should.
Logged
diogo.urb
Newbie
*
Posts: 42


View Profile
« Reply #6 on: October 26, 2009, 10:57:49 AM »

Found the whole problem:::

here is the initial startup of cycas:

/usr/local/bin/cycas39

#!/bin/sh
export LANG=de_DE
xmodmap -e "keycode 0x6C =  Return"
cd /opt/cycas39; ./cycas.real $1 > /dev/null 2>&1 &

The line in bold is the whole problem... maybe in german language the keycode 0x6c should be return but using xev I found out that my altGR is the 0x6C so the bash startup script of cycas is making altgr weird... change this startup from that to:

#!/bin/sh
export LANG=de_DE
#xmodmap -e "keycode 0x6C =  Return"
cd /opt/cycas39; ./cycas.real $1 > /dev/null 2>&1 &

And do the same for /usr/local/bin/cyca39_verbose:

#!/bin/sh
export LANG=de_DE
#xmodmap -e "keycode 0x6C =  Return"
cd /opt/cycas39; ./cycas.real $* &

I think that if this line is necessary for those whose keyboard is german then I think it should start with a conditional to check for system default:

#!/bin/sh
if LANG=de_DE, then
  xmodmap -e "keycode 0x6C = Return"
else
  export LANG=de_DE
endif
cd /opt/cycas39; ./cycas.real $* &


This way it check if the system is already set to de_DE LANG then it will need the xmodmap, if not it doesn´t need the xmodmap trick and just set the LANG variable to de_DE and then it starts cycas normally

This is not the correct way since checking LANG variable to see if you need the xmodmap trick is not a good direction (since we might have people with us keyboard using the pc with de_DE LANG )

So first why would the developers need the xmodmap in the first place, since this should be taken care of by evdev and xorg? For me just a # in front of the xmodmap ... line is the ideal trick to keep everything working.

Thank good I found the answer... its been more then 3 months trying to find this out  Grin

Please tell me if it works for everyone that came in this post saying that cycas startup changes ALTGR to enter aswell !!!  Smiley
Logged
xluis
Jr. Member
**
Posts: 94



View Profile
« Reply #7 on: October 26, 2009, 01:03:42 PM »

Uff!!!! diogo, you are a master!
Logged
steve
Sr. Member
****
Posts: 261



View Profile
« Reply #8 on: October 31, 2009, 03:52:39 AM »

yes, diogo, good detective work!
Logged
luca
Full Member
***
Posts: 111



View Profile
« Reply #9 on: November 03, 2009, 09:36:19 AM »

Big diogo! Hope you aren´t missing beer and girls for this!  Smiley
Logged
richgriswold
Newbie
*
Posts: 7


View Profile WWW
« Reply #10 on: December 20, 2009, 07:17:46 PM »

Thank you for this information.  I use the altgr-intl layout, and it was driving me nuts when atlgr would start acting like the Enter key.  I had just tracked the problem down to Cycas, but I didn´t have all the details yet.
Logged
richgriswold
Newbie
*
Posts: 7


View Profile WWW
« Reply #11 on: December 20, 2009, 07:18:03 PM »

Thank you for this information.  I use the altgr-intl layout, and it was driving me nuts when atlgr would start acting like the Enter key.  I had just tracked the problem down to Cycas, but I didn´t have all the details yet.
Logged
flamenco108
Newbie
*
Posts: 2


Nondum linua suum, dextra peregit opus.


View Profile WWW
« Reply #12 on: November 11, 2011, 08:15:08 PM »


<b>#xmodmap -e "keycode 0x6C =  Return"</b>

May the beer would never be too cold/warm in Your glass! On Polish keyboard I had the same problem (we use AltGr to print Polish "ogonki" letters) - and Your solution helped.

Thanks!
Logged
flamenco108
Newbie
*
Posts: 2


Nondum linua suum, dextra peregit opus.


View Profile WWW
« Reply #13 on: November 11, 2011, 08:23:36 PM »


<b>#xmodmap -e "keycode 0x6C =  Return"</b>

I have also another question:
Does the starting script really need this line:
Quote
export LANG=de_DE

As it changes the locale and prevents me from writing with Polish letters on my projects - it might be useful.
Logged
Pages: [1]
Print
Jump to: