BillBillBillBill / Tickeys-linux

Instant audio feedback when typing. For Linux.
https://pypi.python.org/pypi/tickeys
MIT License
277 stars 41 forks source link

如有问题,请在此issue下提出 #1

Closed BillBillBillBill closed 9 years ago

tracyone commented 9 years ago

无线键盘无法发出声音..笔记本自带的就行,无线键盘是通过插入usb收发器的..

BillBillBillBill commented 9 years ago

@tracyone 因为没有无线键盘,并没有测试这个。可以用cat /proc/bus/input/devices这个命令输出一下设备名字然后发给我看看吗?麻烦了。

tracyone commented 9 years ago

I: Bus=0019 Vendor=0000 Product=0001 Version=0000 N: Name="Power Button" P: Phys=PNP0C0C/button/input0 S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/PNP0C0C:00/input/input0 U: Uniq= H: Handlers=kbd event0 B: PROP=0 B: EV=3 B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0003 Version=0000 N: Name="Sleep Button" P: Phys=PNP0C0E/button/input0 S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/PNP0C0E:00/input/input1 U: Uniq= H: Handlers=kbd event1 B: PROP=0 B: EV=3 B: KEY=4000 0 0

I: Bus=0019 Vendor=0000 Product=0005 Version=0000 N: Name="Lid Switch" P: Phys=PNP0C0D/button/input0 S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input2 U: Uniq= H: Handlers=event2 B: PROP=0 B: EV=21 B: SW=1

I: Bus=0019 Vendor=0000 Product=0001 Version=0000 N: Name="Power Button" P: Phys=LNXPWRBN/button/input0 S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3 U: Uniq= H: Handlers=kbd event3 B: PROP=0 B: EV=3 B: KEY=10000000000000 0

I: Bus=0011 Vendor=0001 Product=0001 Version=ab83 N: Name="AT Translated Set 2 keyboard" P: Phys=isa0060/serio0/input0 S: Sysfs=/devices/platform/i8042/serio0/input/input4 U: Uniq= H: Handlers=sysrq kbd event4 B: PROP=0 B: EV=120013 B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe B: MSC=10 B: LED=7

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1 N: Name="SynPS/2 Synaptics TouchPad" P: Phys=isa0060/serio1/input0 S: Sysfs=/devices/platform/i8042/serio1/input/input6 U: Uniq= H: Handlers=mouse0 event5 B: PROP=5 B: EV=b B: KEY=e520 10000 0 0 0 0 B: ABS=660800011000003

I: Bus=0003 Vendor=09da Product=054f Version=0111 N: Name="A4TECH USB Device" P: Phys=usb-0000:00:14.0-3.3/input0 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.3/3-3.3:1.0/input/input7 U: Uniq= H: Handlers=sysrq kbd event6 js0 B: PROP=0 B: EV=12001f B: KEY=4c37fff072ff32d bf54445600000000 c00000000000001 30c100b17c007 ffa67bfad951dfff febeffdfffefffff fffffffffffffffe B: REL=40 B: ABS=ffffff01000701ff B: MSC=10 B: LED=1f

I: Bus=0003 Vendor=09da Product=054f Version=0111 N: Name="A4TECH USB Device" P: Phys=usb-0000:00:14.0-3.3/input1 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.3/3-3.3:1.1/input/input8 U: Uniq= H: Handlers=mouse1 event7 B: PROP=0 B: EV=17 B: KEY=ffff0000 0 0 0 0 B: REL=103 B: MSC=10

I: Bus=0019 Vendor=0000 Product=0006 Version=0000 N: Name="Video Bus" P: Phys=LNXVIDEO/video/input0 S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:3b/LNXVIDEO:00/input/input9 U: Uniq= H: Handlers=kbd event8 B: PROP=0 B: EV=3 B: KEY=3e000b00000000 0 0 0

I: Bus=0019 Vendor=0000 Product=0000 Version=0000 N: Name="Ideapad extra buttons" P: Phys=ideapad/input0 S: Sysfs=/devices/platform/VPC2004:00/input/input10 U: Uniq= H: Handlers=rfkill kbd event9 B: PROP=0 B: EV=13 B: KEY=1400800100c03 400000000300000 0 0 B: MSC=10

I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH Headphone" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input12 U: Uniq= H: Handlers=event10 B: PROP=0 B: EV=21 B: SW=4

I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA Intel PCH Mic" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input11 U: Uniq= H: Handlers=event11 B: PROP=0 B: EV=21 B: SW=10

I: Bus=0003 Vendor=04f2 Product=b331 Version=6011 N: Name="Lenovo EasyCamera" P: Phys=usb-0000:00:14.0-1/button S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0/input/input13 U: Uniq= H: Handlers=kbd event12 B: PROP=0 B: EV=3 B: KEY=100000 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="HDA NVidia HDMI/DP,pcm=3" P: Phys=ALSA S: Sysfs=/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input14 U: Uniq= H: Handlers=event13 B: PROP=0 B: EV=21 B: SW=140

BillBillBillBill commented 9 years ago

@tracyone 更新了键盘检测方法,可以尝试

tracyone commented 9 years ago

还有个问题,为啥鼠标移动和滚轮的时候依然有声音呢?故意这样的?无线鼠标...

BillBillBillBill commented 9 years ago

上传了新版本:)

tomjacks commented 9 years ago

求解。

Root checking...
Root checking success..
ALSA lib pcm_dmix.c:1024:(snd_pcm_dmix_open) unable to open slave
Traceback (most recent call last):
  File "/usr/bin/tickeys", line 9, in <module>
    load_entry_point('tickeys==0.1.3', 'console_scripts', 'tickeys')()
  File "/usr/lib/python2.7/site-packages/tickeys/run.py", line 50, in run
    run_CLI()
  File "/usr/lib/python2.7/site-packages/tickeys/run.py", line 28, in run_CLI
    CLI().cmdloop()
  File "/usr/lib/python2.7/site-packages/tickeys/CLI.py", line 19, in __init__
    self.detecter = KeyboardHandler()
  File "/usr/lib/python2.7/site-packages/tickeys/KeyboardHandler.py", line 26, in __init__
    self.sp = SoundPlayer()
  File "/usr/lib/python2.7/site-packages/tickeys/SoundPlayer.py", line 20, in __init__
    self.mixer.init(frequency=22050)
pygame.error: No available audio device
BillBillBillBill commented 9 years ago

这是个怪异的问题,重启试试?(认真)

tomjacks commented 9 years ago

It works! :joy:

xy-23 commented 5 years ago

我想问一下Resources里的音效fast和slow是在打字的时候动态设置的还是预先设置好的