With Kontakt, you can take a full drum loop sample and auto-slice it to detect the drum hits and automatically map them to keys. This is a great way of turning a loop into a playable drum kit. It also allows you to copy the MIDI to your host to replicate the full beat in perfect time as the original.
Disable key tracking
In the Source section, disable the Tracking so it does not adjust sample pitches based on the note played.
Add your loop sample
In the Mapping Editor for a new Kontakt instrument, drag and drop the drum loop.
Configure the slicer
In the Wave Editor, go to the Sync/Slice tab. Choose Use Beat Machine, unless you are using a tonal sample and not a drum loop, then Use Time Machine Pro.
On the right side, in the Grid area, you can Fix hard-coded intervals, or go to Auto and have it set regions automatically based on the transients it detects. You can adjust the sensitivity to get more or less regions.
Perform the slice and map
The next step is to perform the actual slice and map those slices to keys. You have a couple options: have Kontakt automatically do it, or do it manually with more control.
Map all slices automatically
In the Sync/Slice section, I like to leave Auto-Find Empty Keys for easy mapping. It will stop and warn if there are not enough consecutive keys available.
Use the Drag MIDI to Host button. Dragging it somewhere will create the MIDI with the proper time to play the beat in perfect replica of the original. When you take this action, it performs the slice and updates the Mapping Editor to show the new slices individually. Note you can just click the Drag MIDI to Host button without dragging it anywhere, and it will still perform the slice.
Map only select slices
Select the slices you want to keep. You can select individually by holding the CMD/CTRL key or select ranges by holding SHIFT and clicking. Then drag and drop onto the Mapping Editor. Note that where you drag onto the Mapping Editor makes a big difference. At the top each slice will span multiple keys. At the bottom, it will map one key per sample. If you go even lower onto a key, it will map all the samples to that one key for different velocity levels.