Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
930 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  Multimédia

  [KDE] KHotKeys : contrôle fin du volume ? (résolu)

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[KDE] KHotKeys : contrôle fin du volume ? (résolu)

n°564058
j_c_p
Linux user
Posté le 30-09-2004 à 13:38:16  profilanswer
 

Bonjour,
 
Je suis en train de tester KHotKeys, l'outil de KDE qui permet l'assignation des touches/boutons sur un clavier/souris, cela fctionne très facilement (notamment pour assigner des touches à des parties précises du mixeur, via kmix), mais je me pose qqs questions  :
 
1/ comment faire pour obtenir un contrôle du volume ds des applications telles que des jeux (typiquement Chromium) ? Que permet dcop ?
Car, là, le contrôle du volume est inoppérant :/.
 
2/ kmix permet d'assigner très facilement certaines touches, genre volume + - pour augmenter / réduire le son du canal principal ou du line in par exemple.
Mais, comment faire pour choisir l'incrément ? Car "de base", j'ai  0 10 19 28 comme % du volume, j'aimerais plutôt avoir 0 4 8 12 16 ... :).
 
Merci pour votre attention  :jap:.
 
édit : le fichier correspondant aux actions ds le centre de contrôle de KDE est ~/.kde/share/config/khotkeysrc


Message édité par j_c_p le 30-09-2004 à 16:38:01
mood
Publicité
Posté le 30-09-2004 à 13:38:16  profilanswer
 

n°564072
j_c_p
Linux user
Posté le 30-09-2004 à 14:28:53  profilanswer
 

Je compléte un peu ma démarche ;).
 
Mon but initial est de "mapper" les entrées line in et CD de mon mixeur sur mon clavier multimédia (car les contrôles de volume st indépendants).
 
Initialement j'ai le canal de sortie Master de mes sorties audio qui est mappé sur mon clavier (touche + - du volume, Internet Keyboard pro de chez Microsoft) via lineak.
 
Ma première idée fut de continuer à utiliser lineak (notamment via le plugin KDE -> http://lineak.sourceforge.net/index.php?nav=docs où il existe une macro sur kmix dont les spécs st exactement ce que je veux :)).
 

kmix_plugin
 
The kmix plugin supports three macros. These are: KMIX_VOLUP, KMIX_VOLDOWN, KMIX_MUTE.  
These macros follow the EAK_ style macros in that they support options.
 
KMIX_MUTE This is the default form of the macro. If used in this form it will mute the first mixer to a volume of 0.
KMIX_MUTE(X) Here X is a kmix mixer. You can get a list of mixers that are supported by running: dcop kmix
KMIX_MUTE(device,device2,device3,...) Here deviceX is a string name of a mixer device (e.g. "Mixer0" to mute.) This allows you to mute more than one mixer at a time.
For the KMIX_VOLUP and KMIX_VOLDOWN macros. Each have the following forms.
KMIX_VOLUP or KMIX_VOLDOWN Increment or decrement the default mixer by an increment of 5. KMIX_VOLUP(X) or KMIX_VOLDOWN(X) Increment or decrement the default kmix mixer by a value of X.
KMIX_VOLUP(X,device,X2,device2,X3,device3,...) or KMIX_VOLDOWN(X,device,X2,device2,X3,device3,...) X is the volume to adjust the following device by.

 
 
Bon, chez moi :

[14:23][jcp@phoenix]
[~] > dcop kmix
qt
KDebug
MainApplication-Interface
Mixer0
Mixer1
kmix
kmix-mainwindow#1


Et après qqs essais non fructueux (lineak 0.8 aussi), genre  

WebBack = KMIX_VOLDOWN(4,Mixer0)
WebForward = KMIX_VOLUP(4,Mixer0)


Et bien que Media-Detect soit très intéressant aussi, notamment l'assignation différentes des touches en fct du logiciel :love: ( http://www.kde-apps.org/content/sh [...] explevel=3 ), j'ai testé un peu également, je suis tombé sur KHotKeys via kmix qui me résoud bien mon pb, sauf pour le contrôle fin du volume et le contrôle de celui-ci ds des applis style jeux :/.
 
Je pense que qq chose m'échappe, si une bonne âme pouvait m'éclairer :) ...
 
édit : je retrouve également les paramétres qt KDebug, MainApplication-Interface, Mixer0, Mixer1, kmix et kmix-mainwindow#1 lorsque je choisis de créer une nouvelle action pour KHotKeys de type raccourci clavier -> appel DCOP (simple) ...


Message édité par j_c_p le 30-09-2004 à 14:33:42
n°564101
bobuse
Posté le 30-09-2004 à 15:14:55  profilanswer
 

pour les jeux, je pense que le jeu ne passe pas par la couche aRts, et que kmix ne permet de controler que cette couche. Essaye avec aumix ;)
 
pour le réglage plus fin du volume, chez moi, j'ai  

dcop kmix Mixer0 setVolume x y

x: numéro de piste et y pourcentage
 ou

dcop kmix Mixer0 setMasterVolume x

x : pourcentage à calculer à partie de

dcop kmix Mixer0 masterVolume

et de l'incrément souhaité :)


---------------
get amaroK plugin
n°564102
bobuse
Posté le 30-09-2004 à 15:16:58  profilanswer
 

et hop exemple :

read INC; VOL_CUR=`dcop kmix Mixer0 masterVolume`; VOL=`expr $VOL_CUR + $INC`; dcop kmix Mixer0 setMasterVolume $VOL


 
suffit de taper l'incrément et ça augmente le master :)
 
youpi dcop


Message édité par bobuse le 30-09-2004 à 15:17:40

---------------
get amaroK plugin
n°564106
j_c_p
Linux user
Posté le 30-09-2004 à 15:19:50  profilanswer
 

;)
Je viens juste de désactiver KMilo et mon incrément est bon là :) (ta soluce est bcp mieux cependant ;)) : http://forums.gentoo.org/viewtopic [...] ht=khotkey
 
Reste le souci de modifier le son ds les jeux :/.
 
Une idée ?
 
édit : je n'ai plus l'OSD en désactivant KMilo :/


Message édité par j_c_p le 30-09-2004 à 15:24:33
n°564149
j_c_p
Linux user
Posté le 30-09-2004 à 16:12:26  profilanswer
 

Pour ceux qui ne connaissent pas :

Globally-available mouse gestures — KHotKeys
 
Mouse gestures, used in Opera for navigation and available in other applications and platforms, are widely praised as a quick and intuitive way of executing specific commands. With version 2 of KHotKeys, KDE received its own integrated and highly-flexible solution as well. With flexibility comes obstacles, as making effective use of mouse gestures is difficult since none are activated by default, and the type of users who might profit the most of mouse gestures might not be able to set up them to begin with.
 
KHotKeys in general is a manager for globally-available shortcuts, either keyboard commands or mouse gestures. It can execute custom commands on the CLI, type custom strings of keyboard input, as well as send DCOP commands to specific applications. Mouse gestures are represented on a 3x3 fields grid (looking like and named after the common number pad), recording the order in which those fields are crossed with the mouse. Such a small grid obviously will not be able to represent rounded shapes, so to reduce potential misinterpretations of mouse gestures round shapes should generally be avoided.
 
Let us look at creating a mouse gesture for the widely used shortcut Ctrl+N. The gesture should have the shape of an N and the key sequence should be input to the currently focused application. To achieve this we first start KHotKeys by typing khotkey in KDE's MiniCLI, which is accessible using the shortcut Alt+F2. Now we are confronted with a two-pane interface. On the left there is the list of actions and on the right are the settings for each of them. First we create a new action by pressing the respective button. The newly appearing General tab allows us to set a custom name for our action, and from Action type we select Gesture -> Keyboard Input (simple) which fits our purpose perfectly. Now on the Gestures tab we press the Edit... button and "paint" our N shaped gesture three times into the draw area. As soon as this has been correctly done, the shape can be saved and the respective grid order appears as number on the Gestures tab (in our case it should be 1475369). Now we can add our keyboard input on the Keyboard Input Setting tab, simply typing Ctrl+N into the Keyboard input, pressing Apply and the action is set up. The keyboard input format is currently a special one, e.g. if you want a gesture to write "Hello" you will need to write Shift+H:E:L:L:O for it to appear correctly.
 
Considering these rather high entrance barriers we hope that people will start sharing their mouse gestures schemes, allowing others to make use of its potential as well without having to dive into all the technical information necessary to set them up (the KHotKeys configuration file, which can easily be imported by anyone, is located at ~/.kde/share/config/khotkeysrc). Similarly a user-friendly wizard and more mouse gestures included by default in future KDE versions may be helpful (the latter appears to be happening for KDE 3.2.1). A couple of mouse gesture collections (including ones similar to Opera and Mozilla style gestures) are available for download already.


http://arstechnica.com/reviews/004 [...] .2-05.html
 
Et donc qqs profils dispo là : http://datschge.gmxhome.de/khotkeys.html
 
Personne n'a d'autres liens sinon ?
 
Bon, je n'ai pas encore trouvé le moyen d'agir sur dcop pour contrôler le volume ds Chromium par exemple (bizarre qd même, car via xmms, xine, etc ... pas de souci pour agir sur le volume).

n°564153
bobuse
Posté le 30-09-2004 à 16:18:10  profilanswer
 

humm ...
 
t'as essayé aumix ?


---------------
get amaroK plugin
n°564164
j_c_p
Linux user
Posté le 30-09-2004 à 16:29:37  profilanswer
 

cad, tu voudrais dire qu'une sortie d'un mixeur serait mutée  :??: ?
 
Car, ce n'est pas un pb de ne pas avoir de son, c'est plutôt de pouvoir le modifier via un réglage quelconque (genre le +- master de mon clavier quoi :/).


Message édité par j_c_p le 30-09-2004 à 16:32:26
n°564167
j_c_p
Linux user
Posté le 30-09-2004 à 16:37:44  profilanswer
 

Résolu : c'était l'entrée Capture qui était mutée :).
 
Merci ;).
 
édit : KHotKeys c'est vraiment bien :).


Message édité par j_c_p le 30-09-2004 à 16:45:02

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  Multimédia

  [KDE] KHotKeys : contrôle fin du volume ? (résolu)

 

Sujets relatifs
[Mandrake10]probleme au démarrage de kdebug Graphique dans la console après switch depuis X [résolu]
[MDK10] ajouter une langue à kde ?Alsa pas de son au démarrage [Résolu par Dark]
relancer xfree apres plantage[RESOLU]amaroK - Lecteur audio KDE
[resolu]probleme formatage avec slaclkware[resolu] Impossible de voir le serveur samba dans le voisinage reseau
Win 98 et samba : Contrôle d'accés[Postfix] Recipient address rejected: User unknown [semi resolu]
Plus de sujets relatifs à : [KDE] KHotKeys : contrôle fin du volume ? (résolu)


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR