How to precisely rotate 3D view using shortcut

Hi, I’m an orthopedic trauma surgeon learning to use slicer for preoperative planning

I’m trying to use 3d slicer for preoperatively measure the angle for optimal c-arm imaging

I have learned about the code snippet that will show the rotation of 3D view from anther thread and I know the numpad 2 4 6 8 can rotate the 3d image by 15 degrees
I want a more fine-tune control of the rotation and I want to change the rotation one axis at a time using the numpad, read somewhere that the key binding function is hard-coded to the program

Is there any way I can change the binding of numpad to rotate the 3d view by 1 degree instead of 15 degrees?

Continuing the discussion from How to precisely rotate 3D view using shortcut:

After some searching around the forum, I found a way to do it making a shortcut key i j k l for pitch up down and yaw left and right with increment 1 degree for each button press by using this code snippet in the file

Will leave this here for future reference and anybody who have the same problem

layoutManager =
threeDView = layoutManager.threeDWidget(0).threeDView()

def step_direction(direction = 'left'):
	if direction == 'left':
		threeDView.yawDirection = threeDView.YawLeft
	if direction == 'right':
		threeDView.yawDirection = threeDView.YawRight
	if direction == 'up':
		threeDView.pitchDirection = threeDView.PitchUp
	if direction == 'down':
		threeDView.pitchDirection = threeDView.PitchDown

shortcuts = [
	("j", lambda: step_direction('left')),
	("l", lambda: step_direction('right')),
	("i", lambda: step_direction('up')),
	("k", lambda: step_direction('down'))

for (shortcutKey, callback) in shortcuts:
	shortcut = qt.QShortcut(slicer.util.mainWindow())
	shortcut.connect( "activated()", callback)