Jump to content
onemanosx

[Guide] - Brightness Hotkey Remapping

Recommended Posts

This is just a re-written instructional based on the posts mentioned below. The only difference between this guide and the rest is the pictorial presentation aimed for new hackintoshers (myself included) whom most of the time find all text only based guides as an intimidation :mrgreen:

Original Posts:

- https://tinyurl.com/vedgjvz

- https://tinyurl.com/umdzc69

- https://tinyurl.com/yx7arde6

 

Guide for supported ASUS Laptops only : https://github.com/hieplpvip/AsusSMC

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

First and foremost, ensure you already have brightness slider activated before proceeding.

 

A0E6LQG.png

Tools you need:

1. MaciASL app (If you had used Olarila image, the app can be found in the "Files" folder of the flashdrive)

2. Rehabman's ACPIDebug.kext (Download here: https://bitbucket.org/RehabMan/os-x-acpi-debug/downloads/)

 

Step 1:

 

- Download ACPIDebug.kext and place in clover/kexts/other

- Open your DSDT file with MacIASL app and click the Patch tab

- copy the following codes and paste in the patch box

#Maintained by: RehabMan for: ACPIDebug
#debug.txt

#
# Facility for writing trace output to system.log
#
# Use in conjunction with ACPIDebug.kext
#
# EXPERIMENTAL
#
# Written by RehabMan 2013-10-15
#

into device label RMDT remove_entry;
into definitionblock code_regex . insert
begin
Device (RMDT)\n
{\n
   Name (_HID, "RMD0000")\n
   Name (RING, Package(256) { })\n
   Mutex (RTMX, 0)\n
   Name (HEAD, 0)\n
   Name (TAIL, 0)\n
   // PUSH: Use to push a trace item into RING for ACPIDebug.kext\n
   Method (PUSH, 1, NotSerialized)\n
   {\n
       Acquire(RTMX, 0xFFFF)\n
       // push new item at HEAD\n
       Add(HEAD, 1, Local0)\n
       If (LGreaterEqual(Local0, SizeOf(RING))) { Store(0, Local0) }\n
       if (LNotEqual(Local0, TAIL))\n
       {\n
           Store(Arg0, Index(RING, HEAD))\n
           Store(Local0, HEAD)\n
       }\n
       Release(RTMX)\n
       Notify(RMDT, 0x80)\n
   }\n
   // FTCH: Used by ACPIDebug.kext to fetch an item from RING\n
   Method (FTCH, 0, NotSerialized)\n
   {\n
       Acquire(RTMX, 0xFFFF)\n
       // pull item from TAIL and return it\n
       Store(0, Local0)\n
       if (LNotEqual(HEAD, TAIL))\n
       {\n
           Store(DerefOf(Index(RING, TAIL)), Local0)\n
           Increment(TAIL)\n
           If (LGreaterEqual(TAIL, SizeOf(RING))) { Store(0, TAIL) }\n
       }\n
       Release(RTMX)\n
       Return(Local0)\n
   }\n
   // COUN: Used by ACPIDebug.kext to determine number of items in RING\n
   Method (COUN, 0, NotSerialized)\n
   {\n
       Acquire(RTMX, 0xFFFF)\n
       // return count of items in RING\n
       Subtract(HEAD, TAIL, Local0)\n
       if (LLess(Local0, 0)) { Add(Local0, SizeOf(RING), Local0) }\n
       Release(RTMX)\n
       Return(Local0)\n
   }\n
   // Helper functions for multiple params at one time\n
   Method (P1, 1, NotSerialized) { PUSH(Arg0) }\n
   Method (P2, 2, Serialized)\n
   {\n
       Name (TEMP, Package(2) { })\n
       Store(Arg0, Index(TEMP, 0))\n
       Store(Arg1, Index(TEMP, 1))\n
       PUSH(TEMP)\n
   }\n
   Method (P3, 3, Serialized)\n
   {\n
       Name (TEMP, Package(3) { })\n
       Store(Arg0, Index(TEMP, 0))\n
       Store(Arg1, Index(TEMP, 1))\n
       Store(Arg2, Index(TEMP, 2))\n
       PUSH(TEMP)\n
   }\n
   Method (P4, 4, Serialized)\n
   {\n
       Name (TEMP, Package(4) { })\n
       Store(Arg0, Index(TEMP, 0))\n
       Store(Arg1, Index(TEMP, 1))\n
       Store(Arg2, Index(TEMP, 2))\n
       Store(Arg3, Index(TEMP, 3))\n
       PUSH(TEMP)\n
   }\n
   Method (P5, 5, Serialized)\n
   {\n
       Name (TEMP, Package(5) { })\n
       Store(Arg0, Index(TEMP, 0))\n
       Store(Arg1, Index(TEMP, 1))\n
       Store(Arg2, Index(TEMP, 2))\n
       Store(Arg3, Index(TEMP, 3))\n
       Store(Arg4, Index(TEMP, 4))\n
       PUSH(TEMP)\n
   }\n
   Method (P6, 6, Serialized)\n
   {\n
       Name (TEMP, Package(6) { })\n
       Store(Arg0, Index(TEMP, 0))\n
       Store(Arg1, Index(TEMP, 1))\n
       Store(Arg2, Index(TEMP, 2))\n
       Store(Arg3, Index(TEMP, 3))\n
       Store(Arg4, Index(TEMP, 4))\n
       Store(Arg5, Index(TEMP, 5))\n
       PUSH(TEMP)\n
   }\n
   Method (P7, 7, Serialized)\n
   {\n
       Name (TEMP, Package(7) { })\n
       Store(Arg0, Index(TEMP, 0))\n
       Store(Arg1, Index(TEMP, 1))\n
       Store(Arg2, Index(TEMP, 2))\n
       Store(Arg3, Index(TEMP, 3))\n
       Store(Arg4, Index(TEMP, 4))\n
       Store(Arg5, Index(TEMP, 5))\n
       Store(Arg6, Index(TEMP, 6))\n
       PUSH(TEMP)\n
   }\n
}\n
end;

#Maintained by: RehabMan for: ACPIDebug
#instrument_Qxx.txt

# generated by instrument.sh

into method label _Q00 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q00 enter")\n
%1\n
\\rmdt.p1("EC _Q00 exit")\n
end;

into method label _Q01 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q01 enter")\n
%1\n
\\rmdt.p1("EC _Q01 exit")\n
end;

into method label _Q02 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q02 enter")\n
%1\n
\\rmdt.p1("EC _Q02 exit")\n
end;

into method label _Q03 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q03 enter")\n
%1\n
\\rmdt.p1("EC _Q03 exit")\n
end;

into method label _Q04 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q04 enter")\n
%1\n
\\rmdt.p1("EC _Q04 exit")\n
end;

into method label _Q05 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q05 enter")\n
%1\n
\\rmdt.p1("EC _Q05 exit")\n
end;

into method label _Q06 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q06 enter")\n
%1\n
\\rmdt.p1("EC _Q06 exit")\n
end;

into method label _Q07 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q07 enter")\n
%1\n
\\rmdt.p1("EC _Q07 exit")\n
end;

into method label _Q08 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q08 enter")\n
%1\n
\\rmdt.p1("EC _Q08 exit")\n
end;

into method label _Q09 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q09 enter")\n
%1\n
\\rmdt.p1("EC _Q09 exit")\n
end;

into method label _Q0A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q0A enter")\n
%1\n
\\rmdt.p1("EC _Q0A exit")\n
end;

into method label _Q0B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q0B enter")\n
%1\n
\\rmdt.p1("EC _Q0B exit")\n
end;

into method label _Q0C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q0C enter")\n
%1\n
\\rmdt.p1("EC _Q0C exit")\n
end;

into method label _Q0D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q0D enter")\n
%1\n
\\rmdt.p1("EC _Q0D exit")\n
end;

into method label _Q0E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q0E enter")\n
%1\n
\\rmdt.p1("EC _Q0E exit")\n
end;

into method label _Q0F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q0F enter")\n
%1\n
\\rmdt.p1("EC _Q0F exit")\n
end;

into method label _Q10 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q10 enter")\n
%1\n
\\rmdt.p1("EC _Q10 exit")\n
end;

into method label _Q11 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q11 enter")\n
%1\n
\\rmdt.p1("EC _Q11 exit")\n
end;

into method label _Q12 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q12 enter")\n
%1\n
\\rmdt.p1("EC _Q12 exit")\n
end;

into method label _Q13 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q13 enter")\n
%1\n
\\rmdt.p1("EC _Q13 exit")\n
end;

into method label _Q14 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q14 enter")\n
%1\n
\\rmdt.p1("EC _Q14 exit")\n
end;

into method label _Q15 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q15 enter")\n
%1\n
\\rmdt.p1("EC _Q15 exit")\n
end;

into method label _Q16 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q16 enter")\n
%1\n
\\rmdt.p1("EC _Q16 exit")\n
end;

into method label _Q17 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q17 enter")\n
%1\n
\\rmdt.p1("EC _Q17 exit")\n
end;

into method label _Q18 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q18 enter")\n
%1\n
\\rmdt.p1("EC _Q18 exit")\n
end;

into method label _Q19 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q19 enter")\n
%1\n
\\rmdt.p1("EC _Q19 exit")\n
end;

into method label _Q1A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q1A enter")\n
%1\n
\\rmdt.p1("EC _Q1A exit")\n
end;

into method label _Q1B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q1B enter")\n
%1\n
\\rmdt.p1("EC _Q1B exit")\n
end;

into method label _Q1C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q1C enter")\n
%1\n
\\rmdt.p1("EC _Q1C exit")\n
end;

into method label _Q1D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q1D enter")\n
%1\n
\\rmdt.p1("EC _Q1D exit")\n
end;

into method label _Q1E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q1E enter")\n
%1\n
\\rmdt.p1("EC _Q1E exit")\n
end;

into method label _Q1F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q1F enter")\n
%1\n
\\rmdt.p1("EC _Q1F exit")\n
end;

into method label _Q20 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q20 enter")\n
%1\n
\\rmdt.p1("EC _Q20 exit")\n
end;

into method label _Q21 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q21 enter")\n
%1\n
\\rmdt.p1("EC _Q21 exit")\n
end;

into method label _Q22 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q22 enter")\n
%1\n
\\rmdt.p1("EC _Q22 exit")\n
end;

into method label _Q23 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q23 enter")\n
%1\n
\\rmdt.p1("EC _Q23 exit")\n
end;

into method label _Q24 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q24 enter")\n
%1\n
\\rmdt.p1("EC _Q24 exit")\n
end;

into method label _Q25 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q25 enter")\n
%1\n
\\rmdt.p1("EC _Q25 exit")\n
end;

into method label _Q26 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q26 enter")\n
%1\n
\\rmdt.p1("EC _Q26 exit")\n
end;

into method label _Q27 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q27 enter")\n
%1\n
\\rmdt.p1("EC _Q27 exit")\n
end;

into method label _Q28 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q28 enter")\n
%1\n
\\rmdt.p1("EC _Q28 exit")\n
end;

into method label _Q29 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q29 enter")\n
%1\n
\\rmdt.p1("EC _Q29 exit")\n
end;

into method label _Q2A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q2A enter")\n
%1\n
\\rmdt.p1("EC _Q2A exit")\n
end;

into method label _Q2B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q2B enter")\n
%1\n
\\rmdt.p1("EC _Q2B exit")\n
end;

into method label _Q2C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q2C enter")\n
%1\n
\\rmdt.p1("EC _Q2C exit")\n
end;

into method label _Q2D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q2D enter")\n
%1\n
\\rmdt.p1("EC _Q2D exit")\n
end;

into method label _Q2E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q2E enter")\n
%1\n
\\rmdt.p1("EC _Q2E exit")\n
end;

into method label _Q2F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q2F enter")\n
%1\n
\\rmdt.p1("EC _Q2F exit")\n
end;

into method label _Q30 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q30 enter")\n
%1\n
\\rmdt.p1("EC _Q30 exit")\n
end;

into method label _Q31 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q31 enter")\n
%1\n
\\rmdt.p1("EC _Q31 exit")\n
end;

into method label _Q32 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q32 enter")\n
%1\n
\\rmdt.p1("EC _Q32 exit")\n
end;

into method label _Q33 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q33 enter")\n
%1\n
\\rmdt.p1("EC _Q33 exit")\n
end;

into method label _Q34 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q34 enter")\n
%1\n
\\rmdt.p1("EC _Q34 exit")\n
end;

into method label _Q35 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q35 enter")\n
%1\n
\\rmdt.p1("EC _Q35 exit")\n
end;

into method label _Q36 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q36 enter")\n
%1\n
\\rmdt.p1("EC _Q36 exit")\n
end;

into method label _Q37 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q37 enter")\n
%1\n
\\rmdt.p1("EC _Q37 exit")\n
end;

into method label _Q38 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q38 enter")\n
%1\n
\\rmdt.p1("EC _Q38 exit")\n
end;

into method label _Q39 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q39 enter")\n
%1\n
\\rmdt.p1("EC _Q39 exit")\n
end;

into method label _Q3A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q3A enter")\n
%1\n
\\rmdt.p1("EC _Q3A exit")\n
end;

into method label _Q3B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q3B enter")\n
%1\n
\\rmdt.p1("EC _Q3B exit")\n
end;

into method label _Q3C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q3C enter")\n
%1\n
\\rmdt.p1("EC _Q3C exit")\n
end;

into method label _Q3D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q3D enter")\n
%1\n
\\rmdt.p1("EC _Q3D exit")\n
end;

into method label _Q3E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q3E enter")\n
%1\n
\\rmdt.p1("EC _Q3E exit")\n
end;

into method label _Q3F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q3F enter")\n
%1\n
\\rmdt.p1("EC _Q3F exit")\n
end;

into method label _Q40 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q40 enter")\n
%1\n
\\rmdt.p1("EC _Q40 exit")\n
end;

into method label _Q41 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q41 enter")\n
%1\n
\\rmdt.p1("EC _Q41 exit")\n
end;

into method label _Q42 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q42 enter")\n
%1\n
\\rmdt.p1("EC _Q42 exit")\n
end;

into method label _Q43 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q43 enter")\n
%1\n
\\rmdt.p1("EC _Q43 exit")\n
end;

into method label _Q44 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q44 enter")\n
%1\n
\\rmdt.p1("EC _Q44 exit")\n
end;

into method label _Q45 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q45 enter")\n
%1\n
\\rmdt.p1("EC _Q45 exit")\n
end;

into method label _Q46 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q46 enter")\n
%1\n
\\rmdt.p1("EC _Q46 exit")\n
end;

into method label _Q47 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q47 enter")\n
%1\n
\\rmdt.p1("EC _Q47 exit")\n
end;

into method label _Q48 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q48 enter")\n
%1\n
\\rmdt.p1("EC _Q48 exit")\n
end;

into method label _Q49 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q49 enter")\n
%1\n
\\rmdt.p1("EC _Q49 exit")\n
end;

into method label _Q4A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q4A enter")\n
%1\n
\\rmdt.p1("EC _Q4A exit")\n
end;

into method label _Q4B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q4B enter")\n
%1\n
\\rmdt.p1("EC _Q4B exit")\n
end;

into method label _Q4C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q4C enter")\n
%1\n
\\rmdt.p1("EC _Q4C exit")\n
end;

into method label _Q4D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q4D enter")\n
%1\n
\\rmdt.p1("EC _Q4D exit")\n
end;

into method label _Q4E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q4E enter")\n
%1\n
\\rmdt.p1("EC _Q4E exit")\n
end;

into method label _Q4F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q4F enter")\n
%1\n
\\rmdt.p1("EC _Q4F exit")\n
end;

into method label _Q50 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q50 enter")\n
%1\n
\\rmdt.p1("EC _Q50 exit")\n
end;

into method label _Q51 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q51 enter")\n
%1\n
\\rmdt.p1("EC _Q51 exit")\n
end;

into method label _Q52 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q52 enter")\n
%1\n
\\rmdt.p1("EC _Q52 exit")\n
end;

into method label _Q53 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q53 enter")\n
%1\n
\\rmdt.p1("EC _Q53 exit")\n
end;

into method label _Q54 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q54 enter")\n
%1\n
\\rmdt.p1("EC _Q54 exit")\n
end;

into method label _Q55 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q55 enter")\n
%1\n
\\rmdt.p1("EC _Q55 exit")\n
end;

into method label _Q56 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q56 enter")\n
%1\n
\\rmdt.p1("EC _Q56 exit")\n
end;

into method label _Q57 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q57 enter")\n
%1\n
\\rmdt.p1("EC _Q57 exit")\n
end;

into method label _Q58 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q58 enter")\n
%1\n
\\rmdt.p1("EC _Q58 exit")\n
end;

into method label _Q59 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q59 enter")\n
%1\n
\\rmdt.p1("EC _Q59 exit")\n
end;

into method label _Q5A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q5A enter")\n
%1\n
\\rmdt.p1("EC _Q5A exit")\n
end;

into method label _Q5B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q5B enter")\n
%1\n
\\rmdt.p1("EC _Q5B exit")\n
end;

into method label _Q5C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q5C enter")\n
%1\n
\\rmdt.p1("EC _Q5C exit")\n
end;

into method label _Q5D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q5D enter")\n
%1\n
\\rmdt.p1("EC _Q5D exit")\n
end;

into method label _Q5E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q5E enter")\n
%1\n
\\rmdt.p1("EC _Q5E exit")\n
end;

into method label _Q5F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q5F enter")\n
%1\n
\\rmdt.p1("EC _Q5F exit")\n
end;

into method label _Q60 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q60 enter")\n
%1\n
\\rmdt.p1("EC _Q60 exit")\n
end;

into method label _Q61 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q61 enter")\n
%1\n
\\rmdt.p1("EC _Q61 exit")\n
end;

into method label _Q62 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q62 enter")\n
%1\n
\\rmdt.p1("EC _Q62 exit")\n
end;

into method label _Q63 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q63 enter")\n
%1\n
\\rmdt.p1("EC _Q63 exit")\n
end;

into method label _Q64 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q64 enter")\n
%1\n
\\rmdt.p1("EC _Q64 exit")\n
end;

into method label _Q65 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q65 enter")\n
%1\n
\\rmdt.p1("EC _Q65 exit")\n
end;

into method label _Q66 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q66 enter")\n
%1\n
\\rmdt.p1("EC _Q66 exit")\n
end;

into method label _Q67 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q67 enter")\n
%1\n
\\rmdt.p1("EC _Q67 exit")\n
end;

into method label _Q68 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q68 enter")\n
%1\n
\\rmdt.p1("EC _Q68 exit")\n
end;

into method label _Q69 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q69 enter")\n
%1\n
\\rmdt.p1("EC _Q69 exit")\n
end;

into method label _Q6A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q6A enter")\n
%1\n
\\rmdt.p1("EC _Q6A exit")\n
end;

into method label _Q6B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q6B enter")\n
%1\n
\\rmdt.p1("EC _Q6B exit")\n
end;

into method label _Q6C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q6C enter")\n
%1\n
\\rmdt.p1("EC _Q6C exit")\n
end;

into method label _Q6D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q6D enter")\n
%1\n
\\rmdt.p1("EC _Q6D exit")\n
end;

into method label _Q6E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q6E enter")\n
%1\n
\\rmdt.p1("EC _Q6E exit")\n
end;

into method label _Q6F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q6F enter")\n
%1\n
\\rmdt.p1("EC _Q6F exit")\n
end;

into method label _Q70 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q70 enter")\n
%1\n
\\rmdt.p1("EC _Q70 exit")\n
end;

into method label _Q71 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q71 enter")\n
%1\n
\\rmdt.p1("EC _Q71 exit")\n
end;

into method label _Q72 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q72 enter")\n
%1\n
\\rmdt.p1("EC _Q72 exit")\n
end;

into method label _Q73 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q73 enter")\n
%1\n
\\rmdt.p1("EC _Q73 exit")\n
end;

into method label _Q74 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q74 enter")\n
%1\n
\\rmdt.p1("EC _Q74 exit")\n
end;

into method label _Q75 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q75 enter")\n
%1\n
\\rmdt.p1("EC _Q75 exit")\n
end;

into method label _Q76 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q76 enter")\n
%1\n
\\rmdt.p1("EC _Q76 exit")\n
end;

into method label _Q77 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q77 enter")\n
%1\n
\\rmdt.p1("EC _Q77 exit")\n
end;

into method label _Q78 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q78 enter")\n
%1\n
\\rmdt.p1("EC _Q78 exit")\n
end;

into method label _Q79 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q79 enter")\n
%1\n
\\rmdt.p1("EC _Q79 exit")\n
end;

into method label _Q7A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q7A enter")\n
%1\n
\\rmdt.p1("EC _Q7A exit")\n
end;

into method label _Q7B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q7B enter")\n
%1\n
\\rmdt.p1("EC _Q7B exit")\n
end;

into method label _Q7C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q7C enter")\n
%1\n
\\rmdt.p1("EC _Q7C exit")\n
end;

into method label _Q7D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q7D enter")\n
%1\n
\\rmdt.p1("EC _Q7D exit")\n
end;

into method label _Q7E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q7E enter")\n
%1\n
\\rmdt.p1("EC _Q7E exit")\n
end;

into method label _Q7F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q7F enter")\n
%1\n
\\rmdt.p1("EC _Q7F exit")\n
end;

into method label _Q80 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q80 enter")\n
%1\n
\\rmdt.p1("EC _Q80 exit")\n
end;

into method label _Q81 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q81 enter")\n
%1\n
\\rmdt.p1("EC _Q81 exit")\n
end;

into method label _Q82 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q82 enter")\n
%1\n
\\rmdt.p1("EC _Q82 exit")\n
end;

into method label _Q83 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q83 enter")\n
%1\n
\\rmdt.p1("EC _Q83 exit")\n
end;

into method label _Q84 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q84 enter")\n
%1\n
\\rmdt.p1("EC _Q84 exit")\n
end;

into method label _Q85 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q85 enter")\n
%1\n
\\rmdt.p1("EC _Q85 exit")\n
end;

into method label _Q86 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q86 enter")\n
%1\n
\\rmdt.p1("EC _Q86 exit")\n
end;

into method label _Q87 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q87 enter")\n
%1\n
\\rmdt.p1("EC _Q87 exit")\n
end;

into method label _Q88 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q88 enter")\n
%1\n
\\rmdt.p1("EC _Q88 exit")\n
end;

into method label _Q89 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q89 enter")\n
%1\n
\\rmdt.p1("EC _Q89 exit")\n
end;

into method label _Q8A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q8A enter")\n
%1\n
\\rmdt.p1("EC _Q8A exit")\n
end;

into method label _Q8B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q8B enter")\n
%1\n
\\rmdt.p1("EC _Q8B exit")\n
end;

into method label _Q8C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q8C enter")\n
%1\n
\\rmdt.p1("EC _Q8C exit")\n
end;

into method label _Q8D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q8D enter")\n
%1\n
\\rmdt.p1("EC _Q8D exit")\n
end;

into method label _Q8E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q8E enter")\n
%1\n
\\rmdt.p1("EC _Q8E exit")\n
end;

into method label _Q8F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q8F enter")\n
%1\n
\\rmdt.p1("EC _Q8F exit")\n
end;

into method label _Q90 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q90 enter")\n
%1\n
\\rmdt.p1("EC _Q90 exit")\n
end;

into method label _Q91 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q91 enter")\n
%1\n
\\rmdt.p1("EC _Q91 exit")\n
end;

into method label _Q92 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q92 enter")\n
%1\n
\\rmdt.p1("EC _Q92 exit")\n
end;

into method label _Q93 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q93 enter")\n
%1\n
\\rmdt.p1("EC _Q93 exit")\n
end;

into method label _Q94 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q94 enter")\n
%1\n
\\rmdt.p1("EC _Q94 exit")\n
end;

into method label _Q95 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q95 enter")\n
%1\n
\\rmdt.p1("EC _Q95 exit")\n
end;

into method label _Q96 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q96 enter")\n
%1\n
\\rmdt.p1("EC _Q96 exit")\n
end;

into method label _Q97 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q97 enter")\n
%1\n
\\rmdt.p1("EC _Q97 exit")\n
end;

into method label _Q98 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q98 enter")\n
%1\n
\\rmdt.p1("EC _Q98 exit")\n
end;

into method label _Q99 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q99 enter")\n
%1\n
\\rmdt.p1("EC _Q99 exit")\n
end;

into method label _Q9A code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q9A enter")\n
%1\n
\\rmdt.p1("EC _Q9A exit")\n
end;

into method label _Q9B code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q9B enter")\n
%1\n
\\rmdt.p1("EC _Q9B exit")\n
end;

into method label _Q9C code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q9C enter")\n
%1\n
\\rmdt.p1("EC _Q9C exit")\n
end;

into method label _Q9D code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q9D enter")\n
%1\n
\\rmdt.p1("EC _Q9D exit")\n
end;

into method label _Q9E code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q9E enter")\n
%1\n
\\rmdt.p1("EC _Q9E exit")\n
end;

into method label _Q9F code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _Q9F enter")\n
%1\n
\\rmdt.p1("EC _Q9F exit")\n
end;

into method label _QA0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA0 enter")\n
%1\n
\\rmdt.p1("EC _QA0 exit")\n
end;

into method label _QA1 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA1 enter")\n
%1\n
\\rmdt.p1("EC _QA1 exit")\n
end;

into method label _QA2 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA2 enter")\n
%1\n
\\rmdt.p1("EC _QA2 exit")\n
end;

into method label _QA3 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA3 enter")\n
%1\n
\\rmdt.p1("EC _QA3 exit")\n
end;

into method label _QA4 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA4 enter")\n
%1\n
\\rmdt.p1("EC _QA4 exit")\n
end;

into method label _QA5 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA5 enter")\n
%1\n
\\rmdt.p1("EC _QA5 exit")\n
end;

into method label _QA6 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA6 enter")\n
%1\n
\\rmdt.p1("EC _QA6 exit")\n
end;

into method label _QA7 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA7 enter")\n
%1\n
\\rmdt.p1("EC _QA7 exit")\n
end;

into method label _QA8 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA8 enter")\n
%1\n
\\rmdt.p1("EC _QA8 exit")\n
end;

into method label _QA9 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QA9 enter")\n
%1\n
\\rmdt.p1("EC _QA9 exit")\n
end;

into method label _QAA code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QAA enter")\n
%1\n
\\rmdt.p1("EC _QAA exit")\n
end;

into method label _QAB code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QAB enter")\n
%1\n
\\rmdt.p1("EC _QAB exit")\n
end;

into method label _QAC code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QAC enter")\n
%1\n
\\rmdt.p1("EC _QAC exit")\n
end;

into method label _QAD code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QAD enter")\n
%1\n
\\rmdt.p1("EC _QAD exit")\n
end;

into method label _QAE code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QAE enter")\n
%1\n
\\rmdt.p1("EC _QAE exit")\n
end;

into method label _QAF code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QAF enter")\n
%1\n
\\rmdt.p1("EC _QAF exit")\n
end;

into method label _QB0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB0 enter")\n
%1\n
\\rmdt.p1("EC _QB0 exit")\n
end;

into method label _QB1 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB1 enter")\n
%1\n
\\rmdt.p1("EC _QB1 exit")\n
end;

into method label _QB2 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB2 enter")\n
%1\n
\\rmdt.p1("EC _QB2 exit")\n
end;

into method label _QB3 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB3 enter")\n
%1\n
\\rmdt.p1("EC _QB3 exit")\n
end;

into method label _QB4 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB4 enter")\n
%1\n
\\rmdt.p1("EC _QB4 exit")\n
end;

into method label _QB5 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB5 enter")\n
%1\n
\\rmdt.p1("EC _QB5 exit")\n
end;

into method label _QB6 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB6 enter")\n
%1\n
\\rmdt.p1("EC _QB6 exit")\n
end;

into method label _QB7 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB7 enter")\n
%1\n
\\rmdt.p1("EC _QB7 exit")\n
end;

into method label _QB8 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB8 enter")\n
%1\n
\\rmdt.p1("EC _QB8 exit")\n
end;

into method label _QB9 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QB9 enter")\n
%1\n
\\rmdt.p1("EC _QB9 exit")\n
end;

into method label _QBA code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QBA enter")\n
%1\n
\\rmdt.p1("EC _QBA exit")\n
end;

into method label _QBB code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QBB enter")\n
%1\n
\\rmdt.p1("EC _QBB exit")\n
end;

into method label _QBC code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QBC enter")\n
%1\n
\\rmdt.p1("EC _QBC exit")\n
end;

into method label _QBD code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QBD enter")\n
%1\n
\\rmdt.p1("EC _QBD exit")\n
end;

into method label _QBE code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QBE enter")\n
%1\n
\\rmdt.p1("EC _QBE exit")\n
end;

into method label _QBF code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QBF enter")\n
%1\n
\\rmdt.p1("EC _QBF exit")\n
end;

into method label _QC0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC0 enter")\n
%1\n
\\rmdt.p1("EC _QC0 exit")\n
end;

into method label _QC1 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC1 enter")\n
%1\n
\\rmdt.p1("EC _QC1 exit")\n
end;

into method label _QC2 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC2 enter")\n
%1\n
\\rmdt.p1("EC _QC2 exit")\n
end;

into method label _QC3 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC3 enter")\n
%1\n
\\rmdt.p1("EC _QC3 exit")\n
end;

into method label _QC4 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC4 enter")\n
%1\n
\\rmdt.p1("EC _QC4 exit")\n
end;

into method label _QC5 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC5 enter")\n
%1\n
\\rmdt.p1("EC _QC5 exit")\n
end;

into method label _QC6 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC6 enter")\n
%1\n
\\rmdt.p1("EC _QC6 exit")\n
end;

into method label _QC7 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC7 enter")\n
%1\n
\\rmdt.p1("EC _QC7 exit")\n
end;

into method label _QC8 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC8 enter")\n
%1\n
\\rmdt.p1("EC _QC8 exit")\n
end;

into method label _QC9 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QC9 enter")\n
%1\n
\\rmdt.p1("EC _QC9 exit")\n
end;

into method label _QCA code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QCA enter")\n
%1\n
\\rmdt.p1("EC _QCA exit")\n
end;

into method label _QCB code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QCB enter")\n
%1\n
\\rmdt.p1("EC _QCB exit")\n
end;

into method label _QCC code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QCC enter")\n
%1\n
\\rmdt.p1("EC _QCC exit")\n
end;

into method label _QCD code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QCD enter")\n
%1\n
\\rmdt.p1("EC _QCD exit")\n
end;

into method label _QCE code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QCE enter")\n
%1\n
\\rmdt.p1("EC _QCE exit")\n
end;

into method label _QCF code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QCF enter")\n
%1\n
\\rmdt.p1("EC _QCF exit")\n
end;

into method label _QD0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD0 enter")\n
%1\n
\\rmdt.p1("EC _QD0 exit")\n
end;

into method label _QD1 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD1 enter")\n
%1\n
\\rmdt.p1("EC _QD1 exit")\n
end;

into method label _QD2 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD2 enter")\n
%1\n
\\rmdt.p1("EC _QD2 exit")\n
end;

into method label _QD3 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD3 enter")\n
%1\n
\\rmdt.p1("EC _QD3 exit")\n
end;

into method label _QD4 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD4 enter")\n
%1\n
\\rmdt.p1("EC _QD4 exit")\n
end;

into method label _QD5 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD5 enter")\n
%1\n
\\rmdt.p1("EC _QD5 exit")\n
end;

into method label _QD6 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD6 enter")\n
%1\n
\\rmdt.p1("EC _QD6 exit")\n
end;

into method label _QD7 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD7 enter")\n
%1\n
\\rmdt.p1("EC _QD7 exit")\n
end;

into method label _QD8 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD8 enter")\n
%1\n
\\rmdt.p1("EC _QD8 exit")\n
end;

into method label _QD9 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QD9 enter")\n
%1\n
\\rmdt.p1("EC _QD9 exit")\n
end;

into method label _QDA code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QDA enter")\n
%1\n
\\rmdt.p1("EC _QDA exit")\n
end;

into method label _QDB code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QDB enter")\n
%1\n
\\rmdt.p1("EC _QDB exit")\n
end;

into method label _QDC code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QDC enter")\n
%1\n
\\rmdt.p1("EC _QDC exit")\n
end;

into method label _QDD code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QDD enter")\n
%1\n
\\rmdt.p1("EC _QDD exit")\n
end;

into method label _QDE code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QDE enter")\n
%1\n
\\rmdt.p1("EC _QDE exit")\n
end;

into method label _QDF code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QDF enter")\n
%1\n
\\rmdt.p1("EC _QDF exit")\n
end;

into method label _QE0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE0 enter")\n
%1\n
\\rmdt.p1("EC _QE0 exit")\n
end;

into method label _QE1 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE1 enter")\n
%1\n
\\rmdt.p1("EC _QE1 exit")\n
end;

into method label _QE2 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE2 enter")\n
%1\n
\\rmdt.p1("EC _QE2 exit")\n
end;

into method label _QE3 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE3 enter")\n
%1\n
\\rmdt.p1("EC _QE3 exit")\n
end;

into method label _QE4 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE4 enter")\n
%1\n
\\rmdt.p1("EC _QE4 exit")\n
end;

into method label _QE5 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE5 enter")\n
%1\n
\\rmdt.p1("EC _QE5 exit")\n
end;

into method label _QE6 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE6 enter")\n
%1\n
\\rmdt.p1("EC _QE6 exit")\n
end;

into method label _QE7 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE7 enter")\n
%1\n
\\rmdt.p1("EC _QE7 exit")\n
end;

into method label _QE8 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE8 enter")\n
%1\n
\\rmdt.p1("EC _QE8 exit")\n
end;

into method label _QE9 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QE9 enter")\n
%1\n
\\rmdt.p1("EC _QE9 exit")\n
end;

into method label _QEA code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QEA enter")\n
%1\n
\\rmdt.p1("EC _QEA exit")\n
end;

into method label _QEB code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QEB enter")\n
%1\n
\\rmdt.p1("EC _QEB exit")\n
end;

into method label _QEC code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QEC enter")\n
%1\n
\\rmdt.p1("EC _QEC exit")\n
end;

into method label _QED code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QED enter")\n
%1\n
\\rmdt.p1("EC _QED exit")\n
end;

into method label _QEE code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QEE enter")\n
%1\n
\\rmdt.p1("EC _QEE exit")\n
end;

into method label _QEF code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QEF enter")\n
%1\n
\\rmdt.p1("EC _QEF exit")\n
end;

into method label _QF0 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF0 enter")\n
%1\n
\\rmdt.p1("EC _QF0 exit")\n
end;

into method label _QF1 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF1 enter")\n
%1\n
\\rmdt.p1("EC _QF1 exit")\n
end;

into method label _QF2 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF2 enter")\n
%1\n
\\rmdt.p1("EC _QF2 exit")\n
end;

into method label _QF3 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF3 enter")\n
%1\n
\\rmdt.p1("EC _QF3 exit")\n
end;

into method label _QF4 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF4 enter")\n
%1\n
\\rmdt.p1("EC _QF4 exit")\n
end;

into method label _QF5 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF5 enter")\n
%1\n
\\rmdt.p1("EC _QF5 exit")\n
end;

into method label _QF6 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF6 enter")\n
%1\n
\\rmdt.p1("EC _QF6 exit")\n
end;

into method label _QF7 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF7 enter")\n
%1\n
\\rmdt.p1("EC _QF7 exit")\n
end;

into method label _QF8 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF8 enter")\n
%1\n
\\rmdt.p1("EC _QF8 exit")\n
end;

into method label _QF9 code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QF9 enter")\n
%1\n
\\rmdt.p1("EC _QF9 exit")\n
end;

into method label _QFA code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QFA enter")\n
%1\n
\\rmdt.p1("EC _QFA exit")\n
end;

into method label _QFB code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QFB enter")\n
%1\n
\\rmdt.p1("EC _QFB exit")\n
end;

into method label _QFC code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QFC enter")\n
%1\n
\\rmdt.p1("EC _QFC exit")\n
end;

into method label _QFD code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QFD enter")\n
%1\n
\\rmdt.p1("EC _QFD exit")\n
end;

into method label _QFE code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QFE enter")\n
%1\n
\\rmdt.p1("EC _QFE exit")\n
end;

into method label _QFF code_regex ([\s\S]*) replace_matched
begin
\\rmdt.p1("EC _QFF enter")\n
%1\n
\\rmdt.p1("EC _QFF exit")\n
end

- Click Apply and close MaciASL

 

J76sxQm.png

 

- Reboot laptop

 

Step 2:

 

a. Open Console app from Launchpad/Other

 

 

QTmktrT.png

 

b. Look at the Syslog as you press your brightness hotkeys on your laptop

 

AyngeC0.png

 

c. In my case, its FN+Arrow Left for decrease brightness and FN+ArrowRight for increase brightness

So, now I know DSDT is calling EC method Q11 and Q12 for my brightness button.

 

Step 3:

 

Next I will find out my keyboard device in DSDT and it is labelled as KBC0. Some devices will have device names PS2M, PS2K or KBD0.

 

xlCNvfv.png

 

Or you can use IOReg, too.

 

M0cm6bu.png

 

Step 4:

Copy and paste the code below in MaciASL

 

into method label _Q1D replace_content
begin
// Brightness Down\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n
end;
into method label _Q1C replace_content
begin
// Brightness Up\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n
end;
 

1. In my case, I will change _Q1D to _Q11 and _Q1C to _Q12 as per my findings through the syslog

2. Then I will change PS2M in code to KBC0 as per my keyboard device name in DSDT

3. Also, check if you have LPCB or LPC device name in DSDT. If it is LPC then rename the code accordingly to correspond to your DSDT. In my case, I do not have to change the code.

 

2NNKTSy.png

 

Eventually my patch will look like this

 

cqfZVM9.png

 

Click Apply. Save your work and reboot! Your brightness keyboard button should be working now!

Can I use this method if I am using ApplePS2SmartTouchPad.kext?

Yes, but your brightness code will be like this

 

into method label _Q11 replace_content
begin
// Brightness Down\n
Notify (PS2K, 0x20)\n
end;

into method label _Q12 replace_content
begin
// Brightness Up\n
Notify (PS2K, 0x10)\n
end
 

# Credit to MaLd0n for pointing this out! :guitar

You can now remove the kext and remove the debugging code safely with the codes below

Remove debugging code

 

#Maintained by: RehabMan for: ACPIDebug
#remove.txt

# remove debugging code

into device label RMDT remove_entry;
into_all all code_regex .*\\RMDT\..* removeall_matched;
into_all all code_regex .*\\rmdt\..* removeall_matched;
into_all all code_regex External\s*\(RMDT.*Obj\) removeall_matched;
++++++++++++++++++++++++++++++++++++++++++++

For support, attach output from https://www.olarila.com/files/Utils/RunMe.app.zip and attach syslog output

  • Like 1

Share this post


Link to post
Share on other sites

[ref]onemanosx[/ref], :guitar:cap Very Nice!

some logs via terminal is very nice too

log show | grep -i acpidebug

Share this post


Link to post
Share on other sites

[ref]onemanosx[/ref], :guitar:cap Very Nice!

some logs via terminal is very nice too

log show | grep -i acpidebug

Yes! also good to check if ACPIDebug kext is loaded. I see unused EC method I can delete! :ugeek:

Share this post


Link to post
Share on other sites

why my maciASL cannot apply that ...i has use the key from acpi debug


Added in 1 minute 9 seconds:

into method label ^[OQ replace_content

begin

// Brightness Down\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n

end;

into method label ^[OR replace_content

begin

// Brightness Up\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n

end;

500323412_Screenshot2019-01-15at10_38_11PM.thumb.png.32b9b97b7dfc9c8b9ab6821a5c6a41ee.png

Share this post


Link to post
Share on other sites

You are doing it wrong. Read the guide again. Slowly.


Edit : The terminal command is only to check that debug kext is loaded. And without doing anything, the terminal will only show the detected EC methods. You are not to type anything in terminal after that command.


You method is wrong to use pre-edited DSDT from MaciASL. You are to extract the your DSDT from clover's origin folder by pressing F4 button at clover bootloader.

Share this post


Link to post
Share on other sites

Hi Onemanosx


I Follow your full tutorial. my Brightness up/down keys Q8E and Q8F.


also try with PS2M because in my DSDT my keyboard in Codes PS2M


and also Device (LPCB) already here. But not worked


my DSDT and Pics Attached.

561519853_Screenshot2019-01-17at2_04_02AM.thumb.png.8004e9f4bc732a3108e1315db4539933.png

576578151_Screenshot2019-01-17at2_04_24AM.thumb.png.ad8126131801a18ae461bb08c76fb68b.png

839501178_Screenshot2019-01-17at2_05_19AM.png.477ca7ebbb26df39e5875a083312b5b7.png

DSDT.aml.zip

Share this post


Link to post
Share on other sites

OneManOsx Try with PS2K



Sir Where i am WRONG Check this pics I am wrongly replace keyboard rename?


in recent post I upload my DSDT plz Check in DSDT.

1720478394_Screenshot2019-01-17at6_53_49PM.thumb.png.c18fdd723a428df7dc3c875db5276f77.png

1844560417_Screenshot2019-01-17at6_54_02PM.thumb.png.683d24771c4610cf8f2e305d6304a93d.png

915318001_Screenshot2019-01-17at6_54_13PM.thumb.png.85855ce25865dfc9de7b20e3a626af23.png

Share this post


Link to post
Share on other sites

[ref]Naveed Ahmad[/ref], This method only works with voodoops2controller. You are using appleps2smartouch kext. Read my reply above on using custom fn keys which might be your solution. Is your trackpad working using voodooI2c kext?

Share this post


Link to post
Share on other sites

onemanosx


you are right working with voodoops2

I installed latest voodoops2 my laptop not hang booting OS X and fn+Brightness keys Working.

thanks OneManOsx Great Tuts :boxing

647869542_Screenshot2019-01-17at7_36_03PM.thumb.png.8e8b2d1dd1f67ff01dd782a954b0e247.png

253736491_Screenshot2019-01-17at7_36_12PM.thumb.png.a865e7979e8c1ba9659d125d3b06afec.png

Share this post


Link to post
Share on other sites

onemanosx


you are right working with voodoops2

I installed latest voodoops2 my laptop not hang booting OS X and fn+Brightness keys Working.

thanks OneManOsx Great Tuts :boxing

Thats great! is your trackpad working?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...