ATSAMD21G18A Low Power mode

i am using the ATSAMD21G18A and i would like to activate sleep mode and deep sleep mode using timeout
like one in mobiles and want to

activate and deactivate sleep mode by single press and turn oN and Off Display

long hold 10 sec for one function(my custom) and

long hold for 5 sec to activate or deactivate deep sleep mode and turn oN and Off Display

as it is a portable device just there are 2 mosfet for display and Activate and Deactivate power to another node there 3v@250uA Mosfet and can hold upto 3A current

how do i use low power library and how