Index: format/app_mouse.format
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/format/app_mouse.format	(revision 2317)
+++ /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/format/app_mouse.format	(working copy)
@@ -477,6 +477,8 @@
 0X06 MOUSE_RM_BUTTON
 0X07 MOUSE_LMR_BUTTON
 0x09 MOUSE_L_BK_BUTTON
+0x0a MOUSE_R_BK_BUTTON
+0x11 MOUSE_L_FW_BUTTON
 0x14 MOUSE_M_FW_BUTTON
 0X18 MOUSE_BK_FW_BUTTON
 //mouse default gpio
Index: output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/eeprom.dat	(revision 2317)
+++ /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-82
+ba
 19
 c2
 84
@@ -67,7 +67,7 @@
 c0
 68
 06
-2a
+2b
 c0
 69
 03
@@ -579,7 +579,7 @@
 70
 8a
 39
-04
+0a
 70
 8a
 3a
@@ -3875,7 +3875,7 @@
 20
 40
 06
-5a
+5b
 d8
 40
 00
@@ -4107,7 +4107,7 @@
 20
 40
 06
-5d
+5e
 68
 48
 c9
@@ -6311,11 +6311,15 @@
 20
 40
 06
-2a
+2b
+20
+40
+06
+61
 20
 20
 41
-1d
+1e
 6f
 e0
 cb
@@ -6331,15 +6335,15 @@
 20
 40
 06
-31
+32
 20
 40
 06
-40
+41
 20
 40
 06
-4d
+4e
 20
 20
 41
@@ -6351,7 +6355,7 @@
 20
 40
 06
-5a
+5b
 20
 40
 41
@@ -6371,7 +6375,7 @@
 20
 40
 06
-5a
+5b
 20
 40
 41
@@ -6391,7 +6395,7 @@
 20
 40
 06
-5a
+5b
 20
 40
 41
@@ -6435,7 +6439,7 @@
 c0
 7f
 86
-49
+4a
 20
 20
 41
@@ -6447,7 +6451,7 @@
 20
 40
 06
-5d
+5e
 68
 48
 c9
@@ -6487,7 +6491,7 @@
 c0
 7f
 86
-56
+57
 20
 20
 41
@@ -6499,7 +6503,7 @@
 20
 40
 06
-5d
+5e
 68
 48
 c9
@@ -6532,8 +6536,60 @@
 20
 61
 2c
-9e
+70
+4b
+a9
+00
+70
+4b
+aa
+00
+70
+4b
+ab
+00
+1f
+e2
+04
+00
+20
+40
+06
+68
+20
+40
+06
+6b
+20
+20
+41
+33
+18
+41
+7e
+11
+c0
+08
+c1
+4e
+20
+60
+00
 00
+18
+41
+7e
+0a
+c0
+05
+41
+4e
+20
+60
+00
+00
+46
+e4
 aa
 55
 40
@@ -7914,64 +7970,8 @@
 55
 9f
 97
-f0
-5c
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+f4
+f9
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-74
-2b
+a3
+77
Index: output/flash.dat
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/flash.dat	(revision 2317)
+++ /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/flash.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-82
+ba
 19
 c2
 84
@@ -67,7 +67,7 @@
 c0
 68
 06
-2a
+2b
 c0
 69
 03
@@ -579,7 +579,7 @@
 70
 8a
 39
-04
+0a
 70
 8a
 3a
@@ -3875,7 +3875,7 @@
 20
 40
 06
-5a
+5b
 d8
 40
 00
@@ -4107,7 +4107,7 @@
 20
 40
 06
-5d
+5e
 68
 48
 c9
@@ -6311,11 +6311,15 @@
 20
 40
 06
-2a
+2b
+20
+40
+06
+61
 20
 20
 41
-1d
+1e
 6f
 e0
 cb
@@ -6331,15 +6335,15 @@
 20
 40
 06
-31
+32
 20
 40
 06
-40
+41
 20
 40
 06
-4d
+4e
 20
 20
 41
@@ -6351,7 +6355,7 @@
 20
 40
 06
-5a
+5b
 20
 40
 41
@@ -6371,7 +6375,7 @@
 20
 40
 06
-5a
+5b
 20
 40
 41
@@ -6391,7 +6395,7 @@
 20
 40
 06
-5a
+5b
 20
 40
 41
@@ -6435,7 +6439,7 @@
 c0
 7f
 86
-49
+4a
 20
 20
 41
@@ -6447,7 +6451,7 @@
 20
 40
 06
-5d
+5e
 68
 48
 c9
@@ -6487,7 +6491,7 @@
 c0
 7f
 86
-56
+57
 20
 20
 41
@@ -6499,7 +6503,7 @@
 20
 40
 06
-5d
+5e
 68
 48
 c9
@@ -6532,8 +6536,60 @@
 20
 61
 2c
-9e
+70
+4b
+a9
+00
+70
+4b
+aa
+00
+70
+4b
+ab
+00
+1f
+e2
+04
+00
+20
+40
+06
+68
+20
+40
+06
+6b
+20
+20
+41
+33
+18
+41
+7e
+11
+c0
+08
+c1
+4e
+20
+60
+00
 00
+18
+41
+7e
+0a
+c0
+05
+41
+4e
+20
+60
+00
+00
+46
+e4
 aa
 55
 40
@@ -7914,64 +7970,8 @@
 55
 9f
 97
-f0
-5c
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+f4
+f9
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-74
-2b
+a3
+77
Index: output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/program.lis	(revision 2317)
+++ /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/program.lis	(working copy)
@@ -15,7 +15,7 @@
 000c c06685fe beq patch19_5 ,p_mouse_motion 
 000d c0670410 beq patch19_6 ,p_mouse_dpi_process 
 000e c0678431 beq patch19_7 ,p_mouse_seting_dpi 
-000f c068062a beq patch1a_0 ,p_mouse_check_key_gpio 
+000f c068062b beq patch1a_0 ,p_mouse_check_key_gpio 
 0010 c069038a beq patch1a_2 ,p_mouse_init_sunt 
 0011 c06983a2 beq patch1a_3 ,p_mouse_sensor_poweron 
 0012 c06a84b2 beq patch1a_5 ,p_mouse_priority_bb_event 
@@ -181,7 +181,7 @@
 008e 20201226 branch set_rf_ldo_cfg89 
 
 p_set_tx_power_pair:
-008f 708a3904 jam 0x04 ,core_tx_pwr_ctrl0 
+008f 708a390a jam 0x0a ,core_tx_pwr_ctrl0 
 0090 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
 0091 20201226 branch set_rf_ldo_cfg89 
 
@@ -1307,7 +1307,7 @@
 03c4 6848c914 fetcht 1 ,mem_matrix_public_gpio 
 03c5 204060e6 call gpio_clr_wake 
 03c6 6fe0c924 fetch 1 ,mem_mouse_sensor_sdio_gpio 
-03c7 2040065a call p_mouse_gpio_config_output_high 
+03c7 2040065b call p_mouse_gpio_config_output_high 
 03c8 d8400003 arg 3 ,temp 
 03c9 20403f96 call mouse_gpio_config_input_pu 
 03ca 20403e80 call mouse_lpm_before_common 
@@ -1385,7 +1385,7 @@
 
 p_mouse_3io6key_dpi_check:
 0400 6fe0c913 fetch 1 ,mem_dpi_button_gpio 
-0401 2040065d call p_mouse_gpio_config_output_low 
+0401 2040065e call p_mouse_gpio_config_output_low 
 0402 6848c913 fetcht 1 ,mem_dpi_button_gpio 
 0403 202041d5 branch mouse_3io6key_check 
 
@@ -2130,82 +2130,102 @@
 0627 20204758 branch mouse_drawing_optima 
 
 p_mouse_key:
-0628 2040062a call p_mouse_check_key_gpio 
-0629 2020411d branch mouse_key + 1 
+0628 2040062b call p_mouse_check_key_gpio 
+0629 20400661 call p_mouse_ghost_key_check 
+062a 2020411e branch mouse_key + 2 
 
 p_mouse_check_key_gpio:
-062a 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
-062b 245a4161 ncall mouse_check_key_gpio_once ,blank 
-062c da200000 arg 0 ,rega 
-062d 20400631 call p_mouse_check_lkey_gpio 
-062e 20400640 call p_mouse_check_bkkey_gpio 
-062f 2040064d call p_mouse_check_fwkey_gpio 
-0630 2020415e branch mouse_check_key_gpio_next 
+062b 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+062c 245a4161 ncall mouse_check_key_gpio_once ,blank 
+062d da200000 arg 0 ,rega 
+062e 20400632 call p_mouse_check_lkey_gpio 
+062f 20400641 call p_mouse_check_bkkey_gpio 
+0630 2040064e call p_mouse_check_fwkey_gpio 
+0631 2020415e branch mouse_check_key_gpio_next 
 
 p_mouse_check_lkey_gpio:
-0631 6fe0c91c fetch 1 ,mem_lbutton_gpio 
-0632 2040065a call p_mouse_gpio_config_output_high 
-0633 20404164 call mouse_check_lkey_gpio 
-0634 6848c91c fetcht 1 ,mem_lbutton_gpio 
-0635 20403f96 call mouse_gpio_config_input_pu 
+0632 6fe0c91c fetch 1 ,mem_lbutton_gpio 
+0633 2040065b call p_mouse_gpio_config_output_high 
+0634 20404164 call mouse_check_lkey_gpio 
+0635 6848c91c fetcht 1 ,mem_lbutton_gpio 
+0636 20403f96 call mouse_gpio_config_input_pu 
 
 p_mouse_check_rkey_gpio:
-0636 6fe0c91d fetch 1 ,mem_rbutton_gpio 
-0637 2040065a call p_mouse_gpio_config_output_high 
-0638 2040416a call mouse_check_rkey_gpio 
-0639 6848c91d fetcht 1 ,mem_rbutton_gpio 
-063a 20403f96 call mouse_gpio_config_input_pu 
+0637 6fe0c91d fetch 1 ,mem_rbutton_gpio 
+0638 2040065b call p_mouse_gpio_config_output_high 
+0639 2040416a call mouse_check_rkey_gpio 
+063a 6848c91d fetcht 1 ,mem_rbutton_gpio 
+063b 20403f96 call mouse_gpio_config_input_pu 
 
 p_mouse_check_mkey_gpio:
-063b 6fe0c91e fetch 1 ,mem_mbutton_gpio 
-063c 2040065a call p_mouse_gpio_config_output_high 
-063d 20404170 call mouse_check_mkey_gpio 
-063e 6848c91e fetcht 1 ,mem_mbutton_gpio 
-063f 20203f96 branch mouse_gpio_config_input_pu 
+063c 6fe0c91e fetch 1 ,mem_mbutton_gpio 
+063d 2040065b call p_mouse_gpio_config_output_high 
+063e 20404170 call mouse_check_mkey_gpio 
+063f 6848c91e fetcht 1 ,mem_mbutton_gpio 
+0640 20203f96 branch mouse_gpio_config_input_pu 
 
 p_mouse_check_bkkey_gpio:
-0640 6fe0c911 fetch 1 ,mem_bk_button_gpio 
-0641 c17f8000 rtneq gpio_disable 
-0642 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
-0643 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
-0644 1fe22600 copy pdata ,regc 
-0645 6848c911 fetcht 1 ,mem_bk_button_gpio 
-0646 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
-0647 c07f8649 beq gpio_disable ,p_mouse_3io6key_bk_check 
-0648 2020417e branch mouse_check_bkkey_gpio_next 
+0641 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+0642 c17f8000 rtneq gpio_disable 
+0643 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
+0644 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
+0645 1fe22600 copy pdata ,regc 
+0646 6848c911 fetcht 1 ,mem_bk_button_gpio 
+0647 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+0648 c07f864a beq gpio_disable ,p_mouse_3io6key_bk_check 
+0649 2020417e branch mouse_check_bkkey_gpio_next 
 
 p_mouse_3io6key_bk_check:
-0649 6fe0c911 fetch 1 ,mem_bk_button_gpio 
-064a 2040065d call p_mouse_gpio_config_output_low 
-064b 6848c911 fetcht 1 ,mem_bk_button_gpio 
-064c 2020418b branch mouse_3io6key_bk_check 
+064a 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+064b 2040065e call p_mouse_gpio_config_output_low 
+064c 6848c911 fetcht 1 ,mem_bk_button_gpio 
+064d 2020418b branch mouse_3io6key_bk_check 
 
 p_mouse_check_fwkey_gpio:
-064d 6fe0c912 fetch 1 ,mem_fw_button_gpio 
-064e c17f8000 rtneq gpio_disable 
-064f 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
-0650 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
-0651 1fe22600 copy pdata ,regc 
-0652 6848c912 fetcht 1 ,mem_fw_button_gpio 
-0653 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
-0654 c07f8656 beq gpio_disable ,p_mouse_3io6key_fw_check 
-0655 20204197 branch mouse_check_fwkey_gpio_next 
+064e 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+064f c17f8000 rtneq gpio_disable 
+0650 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
+0651 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
+0652 1fe22600 copy pdata ,regc 
+0653 6848c912 fetcht 1 ,mem_fw_button_gpio 
+0654 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+0655 c07f8657 beq gpio_disable ,p_mouse_3io6key_fw_check 
+0656 20204197 branch mouse_check_fwkey_gpio_next 
 
 p_mouse_3io6key_fw_check:
-0656 6fe0c912 fetch 1 ,mem_fw_button_gpio 
-0657 2040065d call p_mouse_gpio_config_output_low 
-0658 6848c912 fetcht 1 ,mem_fw_button_gpio 
-0659 202041a4 branch mouse_3io6key_fw_check 
+0657 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+0658 2040065e call p_mouse_gpio_config_output_low 
+0659 6848c912 fetcht 1 ,mem_fw_button_gpio 
+065a 202041a4 branch mouse_3io6key_fw_check 
 
 p_mouse_gpio_config_output_high:
-065a c17f8000 rtneq gpio_disable 
-065b d840003f arg gpcfg_output_high ,temp 
-065c 2020612c branch gpio_config_function_int 
+065b c17f8000 rtneq gpio_disable 
+065c d840003f arg gpcfg_output_high ,temp 
+065d 2020612c branch gpio_config_function_int 
 
 p_mouse_gpio_config_output_low:
-065d c17f8000 rtneq gpio_disable 
-065e d840003e arg gpcfg_output_low ,temp 
-065f 2020612c branch gpio_config_function_int 
+065e c17f8000 rtneq gpio_disable 
+065f d840003e arg gpcfg_output_low ,temp 
+0660 2020612c branch gpio_config_function_int 
+
+p_mouse_ghost_key_check:
+0661 704ba900 jam 0 ,mem_mouse_matrix_key_cow_count 
+0662 704baa00 jam 0 ,mem_mouse_matrix_key_row_count 
+0663 704bab00 jam 0 ,mem_mouse_ghost_flag 
+0664 1fe20400 copy pdata ,temp 
+0665 20400668 call p_mouse_ghost_key_check_l_fw 
+0666 2040066b call p_mouse_ghost_key_check_r_bk 
+0667 20204133 branch mouse_ghost_key_check + 6 
+
+p_mouse_ghost_key_check_l_fw:
+0668 18417e11 and temp ,mouse_l_fw_button ,pdata 
+0669 c008c14e beq mouse_l_fw_button ,mouse_matrix_cow_more_than_one_key 
+066a 20600000 rtn 
+
+p_mouse_ghost_key_check_r_bk:
+066b 18417e0a and temp ,mouse_r_bk_button ,pdata 
+066c c005414e beq mouse_r_bk_button ,mouse_matrix_cow_more_than_one_key 
+066d 20600000 rtn 
               org 0x800
 
 start:
Index: output/ramcode.rom
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/ramcode.rom	(revision 2317)
+++ /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/output/ramcode.rom	(working copy)
@@ -13,7 +13,7 @@
 c06685fe
 c0670410
 c0678431
-c068062a
+c068062b
 c069038a
 c06983a2
 c06a84b2
@@ -141,7 +141,7 @@
 708a390a
 708a3a00
 20201226
-708a3904
+708a390a
 708a3a00
 20201226
 20406e5e
@@ -965,7 +965,7 @@
 6848c914
 204060e6
 6fe0c924
-2040065a
+2040065b
 d8400003
 20403f96
 20403e80
@@ -1023,7 +1023,7 @@
 c07f8400
 2020407f
 6fe0c913
-2040065d
+2040065e
 6848c913
 202041d5
 18427e00
@@ -1574,27 +1574,28 @@
 6fe0c92c
 c1018000
 20204758
-2040062a
-2020411d
+2040062b
+20400661
+2020411e
 6fe0cbf2
 245a4161
 da200000
-20400631
-20400640
-2040064d
+20400632
+20400641
+2040064e
 2020415e
 6fe0c91c
-2040065a
+2040065b
 20404164
 6848c91c
 20403f96
 6fe0c91d
-2040065a
+2040065b
 2040416a
 6848c91d
 20403f96
 6fe0c91e
-2040065a
+2040065b
 20404170
 6848c91e
 20203f96
@@ -1605,10 +1606,10 @@
 1fe22600
 6848c911
 6fe0c914
-c07f8649
+c07f864a
 2020417e
 6fe0c911
-2040065d
+2040065e
 6848c911
 2020418b
 6fe0c912
@@ -1618,10 +1619,10 @@
 1fe22600
 6848c912
 6fe0c914
-c07f8656
+c07f8657
 20204197
 6fe0c912
-2040065d
+2040065e
 6848c912
 202041a4
 c17f8000
@@ -1630,3 +1631,16 @@
 c17f8000
 d840003e
 2020612c
+704ba900
+704baa00
+704bab00
+1fe20400
+20400668
+2040066b
+20204133
+18417e11
+c008c14e
+20600000
+18417e0a
+c005414e
+20600000
Index: program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/program/patch.prog	(revision 2317)
+++ /YC1308AF/branch/mouse/YDN_Project/550_24_bt_logo/program/patch.prog	(working copy)
@@ -211,7 +211,7 @@
 	branch set_rf_ldo_cfg89
 
 p_set_tx_power_pair:
-	jam 0x04,core_tx_pwr_ctrl0
+	jam 0x0a,core_tx_pwr_ctrl0
 	jam 0x00,core_tx_pwr_ctrl1
 	branch set_rf_ldo_cfg89
 
@@ -2757,7 +2757,8 @@
 	nbranch p_fire_key_process,blank
 endif	
 	call p_mouse_check_key_gpio
-	branch mouse_key+1
+	call p_mouse_ghost_key_check
+	branch mouse_key+2
 
 p_mouse_check_key_gpio:
 	fetch 1,mem_sensor_shutdown_flag
@@ -2836,6 +2837,25 @@
 	arg gpcfg_output_low,temp
 	branch gpio_config_function_int
 
+p_mouse_ghost_key_check:
+	jam 0,mem_mouse_matrix_key_cow_count
+	jam 0,mem_mouse_matrix_key_row_count
+	jam 0,mem_mouse_ghost_flag
+	copy pdata,temp
+	call p_mouse_ghost_key_check_L_FW
+	call p_mouse_ghost_key_check_R_BK
+	branch mouse_ghost_key_check+6
+
+p_mouse_ghost_key_check_L_FW:
+	and temp,MOUSE_L_FW_BUTTON,pdata
+	beq MOUSE_L_FW_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+
+p_mouse_ghost_key_check_R_BK:
+	and temp,MOUSE_R_BK_BUTTON,pdata
+	beq MOUSE_R_BK_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+
 
 ///////////////////////////// 2.4g ota  start ///////////////////////////////////////////////////////////
 ifdef G24_OTA
