Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Ridefinire il comoprtamento dei tasti multimediali
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
ReDirEct__
Guru
Guru


Joined: 16 Mar 2006
Posts: 300
Location: Nola (NA) - Italy

PostPosted: Sun May 15, 2011 5:35 pm    Post subject: [Solved] Ridefinire il comoprtamento dei tasti multimediali Reply with quote

Salve a tutti... ho un problema con i tasti multimediali della mia g15. In particolare con il stasto stop che viene riconosciuto come il tasto per abbassare il volume... ho provato ad usare xmodmap per ridefinire il comportamento del tasto, ma sembra che su gnome non abbia effetto e lo riconosce sempre come tasto per decrementare il volume... Sto usando Xorg e udev (senza hal quindi) e non ho trovato ancora un modo per rimappare i tasti. Qualcuno sa come fare?

Last edited by ReDirEct__ on Mon May 16, 2011 12:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
ReDirEct__
Guru
Guru


Joined: 16 Mar 2006
Posts: 300
Location: Nola (NA) - Italy

PostPosted: Mon May 16, 2011 12:38 pm    Post subject: Reply with quote

Ho risolto ma per puro caso... cercando tra i vari comandi e i vari modi per settare gli hotkey sono incappato in "setxkbmap". Ho dato questo comando da shell e il risultato è stato che se prima il tasto stop veniva riconosciuto come "XF86AudioLowerVolume" adesso viene riconosciuto per quello che dovrebbe, cioè "XF86AudioStop". Non chiedetemi il perchè dato che non ho capito di preciso cosa fa il comando e dove si colloca nell'ambito del riconoscimento degli hotkeys da parte di xorg. Anzi, vi sarei grato se qualcuno mi spiegasse perchè sono riuscito a risolvere in questo modo e che cosa fa "setxkbmap"... taggo solved

Edit: Ovviamente va dato ogni volta che viene avviato xorg... :P anche se nel file di configurazione /etc/X11/gdm/Init/Default c'è questa cosa:
Code:
SETXKBMAP=`gdmwhich setxkbmap`
if [ "x$SETXKBMAP" != "x" ] ; then
  # FIXME: is this all right?  Is this completely on crack?
  # What this does is move the xkb configuration from the GDM_PARENT_DISPLAY
  # FIXME: This should be done in code.  Or there must be an easier way ...
  if [ -n "$GDM_PARENT_DISPLAY" ]; then
    XKBSETUP=`( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY $$
    if [ -n "$XKBSETUP" ]; then
      XKBKEYMAP=`echo "$XKBSETUP" | grep '^keymap' | awk '{ print $2 }'`
      XKBTYPES=`echo "$XKBSETUP" | grep '^types' | awk '{ print $2 }'`
      XKBCOMPAT=`echo "$XKBSETUP" | grep '^compat' | awk '{ print $2 }'`
      XKBSYMBOLS=`echo "$XKBSETUP" | grep '^symbols' | awk '{ print $2 }'`
      XKBGEOMETRY=`echo "$XKBSETUP" | grep '^geometry' | awk '{ print $2 }'`
      if [ -n "$XKBKEYMAP" ]; then
        $SETXKBMAP -keymap "$XKBKEYMAP"
      elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBG$
        $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOL$
      elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then
        $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOL$
      elif [ -n "$XKBSYMBOLS" ]; then
        $SETXKBMAP -symbols "$XKBSYMBOLS"
      fi
    fi
  fi
fi

e in teoria dovrebbe andare da solo... ma non ho capito come funziona il tutto
Attendo commenti

Edit 2: ah e in ogni caso i keycodes che ottengo da showkeycode -k non corrispondono a quelli elencati da xmodmap -pke. Ad esempio il tasto stop della tastiera ha keycode = 166 ma xmodmap mi dice che è 174. Ho provato a creare uno .Xmodmap nella home e dato in pasto ad xmodmap ma torna tutto come prima e mi sballa i keycode... in .Xmodmap ci sono i keycode che mi restituisce shokeycode ma evidentemento sono sbagliati...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum