Apparently I found a simpler way of connecting and mapping the PS3 Remote Control without having to install
Bluez
or
Blueman
modified packages, I just used
evdevremapkeys
.
1. First I modified the Bluetooth configuration files and disabled the security to connect without PIN, I modified the
/etc/bluetooth/network.conf
file, leaving both options as below:
Code:
Disable link encryption: default = true
DisableSecurity = true
2. Restart the Service:
Code:
sudo systemctl stop bluetooth.service
sudo systemctl start bluetooth.service
3. To install
evdevremapkeys
, it was necessary to add air to Python 3.4 PPA.
Code:
sudo add-apt-repository ppa:deadsnakes/ppa
4. I installed
Python 3.4
.
Code:
sudo apt-get update
sudo apt-get install python3.4 python-dev python3-dev
5. I installed
python3-pip
.
Code:
sudo apt-get install python3-pip
6. Next, I installed exactly the same packages as the developer said, but the latest packages should work.
Code:
sudo -H pip3 install python-daemon==2.1.2
sudo -H pip3 install evdev==0.7.0
sudo -H pip3 install pyxdg==0.25
sudo -H pip3 install PyYAML==3.12
7. I installed Git to download the
evdevremapkeys
repository.
Code:
sudo apt-get install git
8. I installed the
evdevremapkeys
.
9. On
Linux Minti
I had to change the permissions on
/dev/uinput
, in Ubuntu I did not have this problem, if you have an error:
Code:
sudo chmod +0666 /dev/uinput
10. With the command
sudo evdevremapkeys -l
you can check the event and name of the control on your system.
Code:
luiz@HP:~$ sudo evdevremapkeys -l
/dev/input/event12: "BD Remote Control
Note: The name of the control appeared differently in Mint and Ubuntu, it may be because in Ubuntu I installed modified bluez and blueman packages before finding this method.
You will need to create a
config.yaml
configuration file, this is my
yalm
file.
After creating your file you can use the command below to test.
Code:
evdevremapkeys -f /path to file/config.yaml
config
This setup is based on
Kodi
, but when I used Kodi on Windows I also used the
Keymap Editor
inside Kodi to set specific functions for certain buttons and still have that button doing something else inside Windows, now Linux.
My file might work for any other system, but I noticed that in Mint and Ubuntu a few keys came up with a different name.
Using
evtest
you can see the list of keys, both the keyboard and PS3 control and which keys you can use to map.
I have not yet tested the
daemon
option, I hope it solves the problem of not having to have the device connected to run
evdevremapkeys
.
The solution given by
kornaz
also seems to work, but the
Eject, SCAN
and
PLAY
key were not accepting mapping, I do not know why, but it did not work, with evdevremapkeys, I was able to map all the buttons I tested ).
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------- PT-BR ------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Aparentemente achei uma forma mais simples de conectar e mapear o Controle remoto do PS3 sem precisar instalar pacotes modificados do
Bluez
ou
Blueman
, utilizei apenas o
evdevremapkeys
.
1. Primeiro modifiquei os arquivos de configuração do Bluetooth e desabilitei a segurança para conectar sem
PIN
, modifiquei o arquivo
/etc/bluetooth/network.conf
, deixando as duas opções conforme abaixo:
Code:
Disable link encryption: default=true
DisableSecurity=true
2. Reiniciei o Serviço:
Code:
sudo systemctl stop bluetooth.service
sudo systemctl start bluetooth.service
3. Para instalar o
evdevremapkeys
, foi necessário adicionar o
PPA
do
Python 3.4
.
Code:
sudo add-apt-repository ppa:deadsnakes/ppa
4. Instalei o
Python 3.4
.
Code:
sudo apt-get update
sudo apt-get install python3.4 python-dev python3-dev
5. Instalei o
PIP3
.
sudo apt-get install
python3-pip
6. Em seguida instalei exatamente os mesmos pacotes indicados pelo desenvolvedor, mas os mais recentes devem funcionar.
Code:
sudo -H pip3 install python-daemon==2.1.2
sudo -H pip3 install evdev==0.7.0
sudo -H pip3 install pyxdg==0.25
sudo -H pip3 install PyYAML==3.12
7. Instalei o
Git
para baixar o repositório do
evdevremapkeys
.
Code:
sudo apt-get install git
8. Instalei o
evdevremapkeys
.
9. No Linux Minti tive que mudar as permissões em
/dev/uinput
, no Ubuntu não tive esse problema, caso tenha algum erro:
Code:
sudo chmod +0666 /dev/uinput
10. Com o comando
sudo evdevremapkeys -l
você pode verificar o evento e nome do controle no seu sistema.
Code:
luiz@HP:~$ sudo evdevremapkeys -l
/dev/input/event12: "BD Remote Control
Observação: o nome do controle apareceu de forma diferente no Mint e no Ubuntu, pode ser porque no Ubuntu eu instalei pacotes do
bluez
e
blueman
modificados antes de achar esse método.
Será necessário criar um arquivo de configuração
config.yaml
, esse é meu arquivo
yalm
.
Apos criar seu arquivo você pode usar o comando abaixo para testar.
Code:
evdevremapkeys -f /caminho para o arquivo/config.yaml
config
Essa configuração esta baseada no Kodi, mas quando usava o Kodi no Windows também usava o
Keymap Editor
dentro do Kodi para setar funções especificas para certos botoẽs e ainda ter aquele botão fazendo outra coisa dentro do Windows, agora Linux.
Meu arquivo talvez funcione para qualquer outro sistema, mas notei que no Mint e no Ubuntu algumas teclas apareceram com nome diferente.
Usando o
evtest
você ver a lista de teclas, tanto do teclado quanto do controle do PS3 e quais teclas pode usar para mapear.
Ainda não testei a opção daemon, espero que ela resolva o problema de não precisar estar com o dispositivo conectado para executar o evdevremapkeys.
A solução dada pelo kornaz, também parece funcionar, mas a tecla
Eject, SCAN
and
PLAY
não estavam aceitando ser mapeadas, não sei o motivo, mas não funcionava, com o evdevremapkeys, consegui mapear todos os botoes que eu testei (os três acima principalmente).