Button Handler (key handling program)
The key handler is implemented using the Gpiote(GPIO Task and event) processing mechanism, in order to prevent keystrokes from dithering, the timer is turned on in the Gpiote event handler. After the timer expires, the button corresponding to the PIN is still valid (the button has been pressed), the key press event will be reported to the application. When the timer is in operation, a new Gpiote event is generated, and the timer restarts. In addition, in the App_button_init () macro definition, the parameter Use_scheduler indicates whether to use the scheduler (I do not know what the scheduler is for, and later study to say).
Note: The timer in the key handler uses the virtual timer (App_timer), not the peripheral timer (RTC0,RT1,TIM0,TIM1, TIM2, ), the user must ensure that the cache is used (queue) is large enough to remain in the Gpiote module's events (event)   app_timer_stop () / app_timer_start () operation. Even if scheduler Not used, also need to be in App_button.h contains App_scheduler.h, so when compiling, app_scheduler.h must be included in the compiler's path (include paths).  
in app_ble_hrs program, finally through Button_handler_ The P_btn->button_handler (p_btn->pin_no) call in the Execute function implements the processing of the keys.