Dual-mode twisting mechanism