OSX programmatically invoke sound level graphic

前端 未结 2 1650
鱼传尺愫
鱼传尺愫 2021-01-14 16:59

I have an app which can change the volume under OSX. What it lacks is the visual feedback provided when one presses the sound up/down keys. Does anyone know how to programma

2条回答
  •  不知归路
    2021-01-14 17:20

    I would implement this by simulating the physical press of the up/down volume keys, and letting the OS deal with the details. Perhaps the user has disabled the visual feedback, perhaps it changes, etc. - this is the safest way of pulling it off.

    Have a look at this: Simulating key press events in Mac OS X

提交回复
热议问题